Submission #382844

#TimeUsernameProblemLanguageResultExecution timeMemory
382844aris12345678Exam (eJOI20_exam)C++14
0 / 100
3 ms620 KiB
#include <bits/stdc++.h> using namespace std; const int mxN = 1e6+5; int a[mxN], b[mxN]; int main() { int n; scanf("%d", &n); unordered_set<int> s; for(int i = 0; i < n; i++) { scanf("%d", &a[i]); s.insert(a[i]); } bool check = false; for(int i = 0; i < n; i++) { scanf("%d", &b[i]); if(s.find(b[i]) != s.end()) check = true; } if(check) printf("%d\n", n); else printf("0\n"); return 0; }

Compilation message (stderr)

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