Submission #18465

#TimeUsernameProblemLanguageResultExecution timeMemory
18465eaststar동전 게임 (KOI15_coin)C++14
100 / 100
23 ms1084 KiB
#include <stdio.h> int main(){ int k,t,x,y; scanf("%d%d",&k,&t); for(;t--;){ scanf("%d%d",&x,&y); if(x>y){ --x; if(k-x>=x-y)puts("1"); else puts("0"); } else{ if(k-y+1>=y-x)puts("1"); else puts("0"); } } 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...