Advertisement
Guest User

D_AC

a guest
Oct 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int v1[30], v2[30];
  7. cin >> v1[0] >> v1[1] >> v1[2];
  8. cin >> v2[0] >> v2[1] >> v2[2];
  9.  
  10. sort(v1, v1+3);
  11. sort(v2, v2+3);
  12.  
  13. for(int i=0; i<3; i++){
  14. if(v1[i]!=v2[i]){
  15. cout << "Nao" << endl;
  16. return 0;
  17. }
  18. }
  19.  
  20. if((v1[0]*v1[0] + v1[1]*v1[1]) == v1[2]*v1[2])
  21. cout << "Sim" << endl;
  22. else
  23. cout << "Nao" << endl;
  24.  
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement