Skip to content

Instantly share code, notes, and snippets.

@biacunha
Created May 22, 2018 12:27
Show Gist options
  • Save biacunha/df2b83b081862ed3b67134da54b33174 to your computer and use it in GitHub Desktop.
Save biacunha/df2b83b081862ed3b67134da54b33174 to your computer and use it in GitHub Desktop.
//Xadrez - Fase 1 P1 - 2018
//Por Lucio Cardoso
//Complexidade: O(1)
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
int l, c;
cin >> l >> c;
if ((l%2) == (c%2)) {
// se l e c tem mesma paridade
cout << "1\n";
}
else {
// se l e c tem paridades distintas
cout << "0\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment