Codeforces Round 911 (Div. 2) 1900B. Cover in Water Solution



 Problem Link : https://codeforces.com/contest/1900/problem/B

Solution in C++:

  1. /// Author : AH_Tonmoy
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4. int32_t main() {
  5. ios_base::sync_with_stdio(0);
  6. cin.tie(0);
  7. int t;
  8. cin >> t;
  9. while (t--) {
  10. int a , b , c ;
  11. bool x = false , y = false , z = false ;
  12. cin >> a >> b >> c ;
  13. if ((c+b)%2==0) x = true ;
  14. if ((c+a)%2==0) y = true ;
  15. if ((a+b)%2==0) z = true ;
  16. cout << x <<' '<<y <<' '<< z <<'\n';
  17. }
  18. return 0 ;
  19. }

No comments

Most View Post

Recent post

Codeforces Round 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h &g...

Powered by Blogger.