File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ // //https://atcoder.jp/contests/abc362/tasks/abc362_b
2
+ #include < bits/stdc++.h>
3
+ using namespace std ;
4
+ typedef long long ll;
5
+ const int mod = 1e9 + 7 ;
6
+ const int N = 1e5 + 5 ;
7
+
8
+ void solve (){
9
+ // for A
10
+ int xa,ya;cin>>xa>>ya;
11
+ // for B
12
+ int xb,yb;cin>>xb>>yb;
13
+ // for C
14
+ int xc,yc;cin>>xc>>yc;
15
+
16
+ // for AB // formula for distance between two points AB^2=(xb-xa)^2+(yb-ya)^2
17
+ int AB_2=(xb-xa)*(xb-xa)+(yb-ya)*(yb-ya);
18
+ int BC_2=(xc-xb)*(xc-xb)+(yc-yb)*(yc-yb);
19
+ int AC_2=(xc-xa)*(xc-xa)+(yc-ya)*(yc-ya);
20
+
21
+ if (AB_2+BC_2==AC_2 || AB_2+AC_2==BC_2 || AC_2+BC_2==AB_2){
22
+ cout<<" Yes" <<endl;
23
+ }
24
+ else {
25
+ cout<<" No" <<endl;
26
+ }
27
+ }
28
+
29
+ int main () {
30
+ ios_base::sync_with_stdio (0 );
31
+ cin.tie (0 );
32
+ solve ();
33
+ }
You can’t perform that action at this time.
0 commit comments