# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
58400 | 2018-07-17T17:43:10 Z | andy627 | 동전 게임 (KOI15_coin) | C++17 | 45 ms | 5312 KB |
#include <stdio.h> #include <algorithm> using namespace std; int n,m; void solve(){ int a,b; scanf("%d %d",&a,&b); if(a>b && (a-1)-b<=n-(a-1)) printf("1\n"); else if(a<=b && (b-1)-a<=n-b) printf("1\n"); else printf("0\n"); } int main(){ scanf("%d %d",&n,&m); while(m--) solve(); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 248 KB | Output is correct |
2 | Correct | 2 ms | 360 KB | Output is correct |
3 | Correct | 3 ms | 600 KB | Output is correct |
4 | Correct | 3 ms | 660 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 660 KB | Output is correct |
2 | Correct | 4 ms | 776 KB | Output is correct |
3 | Correct | 2 ms | 776 KB | Output is correct |
4 | Correct | 3 ms | 776 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 776 KB | Output is correct |
2 | Correct | 3 ms | 776 KB | Output is correct |
3 | Correct | 6 ms | 872 KB | Output is correct |
4 | Correct | 26 ms | 1392 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 1392 KB | Output is correct |
2 | Correct | 5 ms | 1392 KB | Output is correct |
3 | Correct | 33 ms | 1756 KB | Output is correct |
4 | Correct | 43 ms | 2244 KB | Output is correct |
5 | Correct | 45 ms | 3036 KB | Output is correct |
6 | Correct | 39 ms | 3808 KB | Output is correct |
7 | Correct | 34 ms | 4492 KB | Output is correct |
8 | Correct | 36 ms | 5312 KB | Output is correct |