# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
51636 | 2018-06-19T12:01:43 Z | okaybody10 | 동전 게임 (KOI15_coin) | C++ | 57 ms | 2332 KB |
#include <bits/stdc++.h> using namespace std; bool check[1006][1006]; int main() { int k; scanf("%d",&k); for(int i=0;i<=k;i++) { for(int j=0;j<=k;j++) { if (i<=j&&j>i+(k-i+1)/2||i>j&&i>j+(k-j)/2+1) check[i][j]=false; else check[i][j]=true; } } /*check[k][k]=true; check[k][(k+1)/2]=true; for(int i=k-1;i>=0;i--) { if(i>=(k-1)/2) check[k][i]=true; } for(int i=k-1;i>=0;i--) if(i>=(k+1)/2) check[i][k]=true;*/ int c; scanf("%d",&c); while(c--) { int n,m; scanf("%d %d",&n,&m); printf("%d\n",check[n][m]); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 420 KB | Output is correct |
4 | Correct | 2 ms | 440 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 444 KB | Output is correct |
2 | Correct | 2 ms | 452 KB | Output is correct |
3 | Correct | 2 ms | 632 KB | Output is correct |
4 | Correct | 2 ms | 632 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 632 KB | Output is correct |
2 | Correct | 2 ms | 632 KB | Output is correct |
3 | Correct | 5 ms | 632 KB | Output is correct |
4 | Correct | 31 ms | 1224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 1224 KB | Output is correct |
2 | Correct | 3 ms | 1224 KB | Output is correct |
3 | Correct | 19 ms | 1748 KB | Output is correct |
4 | Correct | 26 ms | 2052 KB | Output is correct |
5 | Correct | 57 ms | 2332 KB | Output is correct |
6 | Correct | 51 ms | 2332 KB | Output is correct |
7 | Correct | 45 ms | 2332 KB | Output is correct |
8 | Correct | 40 ms | 2332 KB | Output is correct |