이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define sz(x) (int)x.size()
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int w, h, k;
cin >> w >> h >> k;
if (!k) {
if (w == 2) {
if (h % 3 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 3) {
if (h % 2 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 4) {
if (h % 3 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 5) {
if (h % 6 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 6) {
if (h % 2 == 0 || h % 3 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
assert(false);
if (w == 7) {
if (h % 6 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 8) {
if (h % 3 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 9) {
if (h % 2 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 10) {
if (h % 3 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 11) {
if (h % 6 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 12) {
if (h % 2 == 0 || h % 3 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
else if (w == 13) {
if (h % 6 == 0)
cout << "YES\n";
else
cout << "NO\n";
}
}
return 0;
}
# | 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... |