답안 #31023

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
31023 2017-08-04T17:26:22 Z TAMREF 동전 게임 (KOI15_coin) C++11
100 / 100
19 ms 2180 KB
#include <bits/stdc++.h>
using namespace std;
int k,Q,m,n;
int main(){
    cin.sync_with_stdio(false);
    cin.tie(0);
    for(cin>>k>>Q;Q--;){
        cin>>m>>n;
        if((m>n && m>n+(k-n)/2+1)||(m<=n && n>m+(k-m+1)/2)) puts("0");
        else puts("1");
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2180 KB Output is correct
2 Correct 0 ms 2180 KB Output is correct
3 Correct 0 ms 2180 KB Output is correct
4 Correct 0 ms 2180 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2180 KB Output is correct
2 Correct 0 ms 2180 KB Output is correct
3 Correct 0 ms 2180 KB Output is correct
4 Correct 0 ms 2180 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2180 KB Output is correct
2 Correct 0 ms 2180 KB Output is correct
3 Correct 0 ms 2180 KB Output is correct
4 Correct 9 ms 2180 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2180 KB Output is correct
2 Correct 0 ms 2180 KB Output is correct
3 Correct 16 ms 2180 KB Output is correct
4 Correct 13 ms 2180 KB Output is correct
5 Correct 13 ms 2180 KB Output is correct
6 Correct 19 ms 2180 KB Output is correct
7 Correct 13 ms 2180 KB Output is correct
8 Correct 16 ms 2180 KB Output is correct