Submission #113261

#TimeUsernameProblemLanguageResultExecution timeMemory
113261starwh03동전 게임 (KOI15_coin)C++14
100 / 100
30 ms512 KiB
#include<stdio.h> int main() { int i,n,m,a,b,t=0; scanf("%d %d",&n,&m); for(i=1;i<=m;i++) { t=0; scanf("%d %d",&a,&b); if(a>b) { t=a; a=b; b=t; t=1; } if(b-a-t<=n-b+1) printf("1\n"); else printf("0\n"); } return 0; }

Compilation message (stderr)

coin.cpp: In function 'int main()':
coin.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d",&n,&m);  
     ~~~~~^~~~~~~~~~~~~~~
coin.cpp:10:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d %d",&a,&b);  
         ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...