Submission #528094

#TimeUsernameProblemLanguageResultExecution timeMemory
528094aris12345678Jarvis (COCI19_jarvis)C++14
0 / 70
34 ms2576 KiB
#include <bits/stdc++.h> using namespace std; #define X first #define Y second int main() { int n; scanf("%d", &n); vector<int> a(n); for(int i = 0; i < n; i++) scanf("%d", &a[i]); map<int, int> mp; for(int i = 0; i < n; i++) { int b; scanf("%d", &b); mp[b-a[i]]++; } printf("%d\n", mp.rbegin()->Y); return 0; }

Compilation message (stderr)

jarvis.cpp: In function 'int main()':
jarvis.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
jarvis.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]);
      |         ~~~~~^~~~~~~~~~~~~
jarvis.cpp:16:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |         scanf("%d", &b);
      |         ~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...