# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
134102 | 2019-07-22T04:43:57 Z | ansol4328 | 동전 게임 (KOI15_coin) | C++11 | 28 ms | 1272 KB |
#include<stdio.h> #include<algorithm> using namespace std; int k, n; int a, b; int main() { scanf("%d %d",&k,&n); for(int i=1 ; i<=n ; i++) { scanf("%d %d",&a,&b); int mval=min(a,b); a-=mval, b-=mval; int x=k-mval; if((a<=(x+2)/2 && b==0) || (a==0 && b<=(x+1)/2)) printf("1\n"); else printf("0\n"); } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 504 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 380 KB | Output is correct |
4 | Correct | 3 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 452 KB | Output is correct |
3 | Correct | 4 ms | 376 KB | Output is correct |
4 | Correct | 21 ms | 888 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 376 KB | Output is correct |
2 | Correct | 3 ms | 376 KB | Output is correct |
3 | Correct | 15 ms | 760 KB | Output is correct |
4 | Correct | 19 ms | 1016 KB | Output is correct |
5 | Correct | 27 ms | 1148 KB | Output is correct |
6 | Correct | 28 ms | 1272 KB | Output is correct |
7 | Correct | 26 ms | 1144 KB | Output is correct |
8 | Correct | 28 ms | 1272 KB | Output is correct |