# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
245116 | 2020-07-05T13:57:30 Z | urd05 | 동전 게임 (KOI15_coin) | C++14 | 32 ms | 1280 KB |
#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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 256 KB | Output is correct |
3 | Correct | 5 ms | 256 KB | Output is correct |
4 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 4 ms | 256 KB | Output is correct |
4 | Correct | 5 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 256 KB | Output is correct |
3 | Correct | 7 ms | 384 KB | Output is correct |
4 | Correct | 27 ms | 896 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 416 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 18 ms | 768 KB | Output is correct |
4 | Correct | 24 ms | 1152 KB | Output is correct |
5 | Correct | 31 ms | 1280 KB | Output is correct |
6 | Correct | 31 ms | 1280 KB | Output is correct |
7 | Correct | 31 ms | 1232 KB | Output is correct |
8 | Correct | 32 ms | 1280 KB | Output is correct |