# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
930934 | rainboy | 동전 게임 (KOI15_coin) | C11 | 22 ms | 1372 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 <stdio.h>
int main() {
int n, q;
scanf("%d%d", &n, &q);
while (q--) {
int x, y;
scanf("%d%d", &x, &y);
if (x > y)
printf("%d\n", y + (n - x + 1) >= x - 1 ? 1 : 0);
else if (x < y)
printf("%d\n", x + (n - y) >= y - 1 ? 1 : 0);
else
printf("1\n");
}
return 0;
}
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... |