Submission #31023

#TimeUsernameProblemLanguageResultExecution timeMemory
31023TAMREF동전 게임 (KOI15_coin)C++11
100 / 100
19 ms2180 KiB
#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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...