This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define debug(a) cout << #a << " = " << a << endl
#define debugsl(a) cout << #a << " = " << a << ", "
#define rep(i,a,b) for(int i = (a); i <= (b); i++)
#define repa(i,a,b) for(int i = (a); i >= (b); i--)
#define pll pair<lli,llix >
#define MAX
lli a,b,n,w,h;
lli arr[15][1002];
vector<lli> aristas[(1<<13)+2];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> w >> h >> n;
if (w == 2 || w == 4 || w == 8) {
if (h%3 == 0) cout << "YES";
else cout << "NO";
}
else if (w == 3 || w == 9) {
if (h%2 == 0) cout << "YES";
else cout << "NO";
}
else if (w == 5 || w == 7 || w == 10 || w == 11 || w == 13) {
if (h%6 == 0) cout << "YES";
else cout << "NO";
}
else if (w == 6 || w == 12) {
cout << "YES";
}
return 0;
}
/* rep(i,1,n) {
cin >> a >> b;
arr[a][b] = 1;
}
//genera las transiciones
lli pos = 0;
lli lim = (1<<13)-1;
while (pos <= lim) {
}
rep(y,1,h) {
}*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |