Submission #57421

#TimeUsernameProblemLanguageResultExecution timeMemory
57421hwangtmdals딱지놀이 (KOI17_card)C++14
100 / 100
24 ms4080 KiB
#include <cstdio> int n; int A[6], B[6]; int main() { scanf("%d", &n); for(int i = 0; i<n; i++) { int a; scanf("%d", &a); for(int j = 0; j<a; j++) { int b; scanf("%d", &b); A[b]++; } scanf("%d", &a); for(int j = 0; j<a; j++) { int b; scanf("%d", &b); B[b]++; } int result = 'D'; for(int j = 4; j>0; j--) { if(A[j]>B[j]) { result = 'A'; break; } else if(A[j]<B[j]) { result = 'B'; break; } } printf("%c\n", result); for(int j = 0; j<5; j++) { A[j] = 0; B[j] = 0; } } return 0; }

Compilation message (stderr)

card.cpp: In function 'int main()':
card.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
  ~~~~~^~~~~~~~~~
card.cpp:14:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &a);
   ~~~~~^~~~~~~~~~
card.cpp:18:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d", &b);
    ~~~~~^~~~~~~~~~
card.cpp:22:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &a);
   ~~~~~^~~~~~~~~~
card.cpp:26:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d", &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...