Guest User

Untitled

a guest
May 26th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. //Xadrez - Fase 1 P1 - 2018
  2. //Por Lucio Cardoso
  3. //Complexidade: O(1)
  4.  
  5. #include <bits/stdc++.h>
  6.  
  7. using namespace std;
  8.  
  9. int main(void)
  10. {
  11. int l, c;
  12. cin >> l >> c;
  13.  
  14. if ((l%2) == (c%2)) {
  15. // se l e c tem mesma paridade
  16. cout << "1\n";
  17. }
  18. else {
  19. // se l e c tem paridades distintas
  20. cout << "0\n";
  21. }
  22. }
Add Comment
Please, Sign In to add comment