Submission #51607

#TimeUsernameProblemLanguageResultExecution timeMemory
51607baneling100동전 게임 (KOI15_coin)C++17
100 / 100
63 ms5328 KiB
#include <cstdio> int K, C, M, N; int main() { int i; scanf("%d %d", &K, &C); for(i = 1; i <= C; i++) { scanf("%d %d", &M, &N); if(M > N) printf("%d\n", N + K >= 2 * (M - 1)); else if(M < N) printf("%d\n", M + K >= 2 * N - 1); else printf("1\n"); } return 0; }

Compilation message (stderr)

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