Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <iostream>
- #include <algorithm>
- #include <vector>
- #include <string>
- #include <queue>
- #include <map>
- #include <set>
- #include <cmath>
- #include <sstream>
- #include <stack>
- #include <cassert>
- #define pb push_back
- #define mp make_pair
- #define PI 3.1415926535897932384626433832795
- #define sqr(x) (x)*(x)
- #define pw(x) (1 << x)
- #define forn(i, n) for(int i = 0; i < n; ++i)
- #define ALL(x) x.begin(), x.end()
- #define X first
- #define Y second
- typedef long long ll;
- typedef unsigned long long ull;
- typedef long double ld;
- using namespace std;
- typedef pair<int,int> pii;
- typedef pair<long double, long double> pldd;
- typedef pair<double, double> pdd;
- const int INF = 2147483647;
- const ll LLINF = 9223372036854775807LL;
- double ax,ay,bx,by,cx,cy;
- double ta,tb,tc;
- double la,lb,lc;
- int main() {
- cin >> ax >> ay >> bx >> by >> cx >> cy;
- la=sqr(bx-cx)+sqr(by-cy);
- lb=sqr(ax-cx)+sqr(ay-cy);
- lc=sqr(ax-bx)+sqr(ay-by);
- ta=acos((lb+lc-la)/(2*sqrt(lb)*sqrt(lc)));
- tb=acos((la+lc-lb)/(2*sqrt(la)*sqrt(lc)));
- tc=acos((la+lb-lc)/(2*sqrt(la)*sqrt(lb)));
- cout << la << " "<< lb << " " << lc << "\n";
- //printf("%f %f %f\n",ta,tb,tc);
- cin >> cx;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment