Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- cout.precision();
- cout.setf(ios::fixed);
- long long a,b,c,d,e,f;
- cin>>a>>b>>c>>d>>e>>f;
- long double ab=sqrt((a-c)*(a-c)+(b-d)*(b-d));
- long double ac=sqrt((a-e)*(a-e)+(b-f)*(b-f));
- long double bc=sqrt((c-e)*(c-e)+(d-f)*(d-f));
- cout<<fixed<<setprecision(7)<<(double)(bc*a+ac*c+ab*e)/(ab+bc+ac)<<" "<<(double)(bc*b+ac*d+ab*f)/(ab+bc+ac);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement