# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
783259 | vh50 | L-triominoes (CEOI21_ltriominoes) | C++17 | 1 ms | 300 KiB |
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 <bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;
int n, m, k;
main()
{
cin >> n >> m >> k;
for(int i = 0; i < k; i++)
{
int a, b;
cin >> a >> b;
}
if((n * m - k) % 6 == 0) cout << "YES" << endl;
else if(n == 3 || m == 3) cout << "NO" << endl;
else if(n % 3 == 0 || m % 3 == 0) cout << "YES" << endl;
else cout << "NO" << endl;
}
Compilation message (stderr)
# | 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... |