# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
245116 | urd05 | 동전 게임 (KOI15_coin) | C++14 | 32 ms | 1280 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>
using namespace std;
int main() {
int k,c;
scanf("%d %d",&k,&c);
for(int i=0;i<c;i++) {
int m,n;
scanf("%d %d",&m,&n);
if (m==n) {
printf("1\n");
continue;
}
if (m>n) {
if (n+k-m+1<m-1) {
printf("0\n");
}
else {
printf("1\n");
}
}
else {
if (m+k-n<n-1) {
printf("0\n");
}
else {
printf("1\n");
}
}
}
}
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... |