Submission #96659

#TimeUsernameProblemLanguageResultExecution timeMemory
96659noneTPJarvis (COCI19_jarvis)C++14
70 / 70
44 ms1544 KiB
#include <bits/stdc++.h> using namespace std; typedef tuple<int, int, int> tp; typedef long long LL; typedef long double LD; typedef pair<int, int> pii; typedef pair<int, LL> pil; typedef pair<LL, int> pli; typedef pair<LL, LL> pll; typedef pair<pii, int> piipi; typedef pair<int, pii> pipii; typedef pair<pii, pii> piipii; typedef pair<LL, pii> plpii; typedef pair<LD, LD> pdd; typedef pair<LD, int> pdi; typedef pair<LD, LL> pdl; typedef pair<int, LD> pid; typedef pair<LL, LD> pld; const int mod = 1e9 + 7; const int hf = 999983; const int N = 1e6; int a[100005], b[100005]; map<int, int> df; int main(){ int n; scanf("%d", &n); for(int i=1;i<=n;i++) scanf("%d", &a[i]); for(int i=1;i<=n;i++) scanf("%d", &b[i]); for(int i=1;i<=n;i++) df[a[i]-b[i]]++; int ans = 0; for(auto its:df) ans = max(ans, its.second); printf("%d\n", ans); }

Compilation message (stderr)

jarvis.cpp: In function 'int main()':
jarvis.cpp:27:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
     ~~~~~^~~~~~~~~~
jarvis.cpp:28:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for(int i=1;i<=n;i++) scanf("%d", &a[i]);
                           ~~~~~^~~~~~~~~~~~~
jarvis.cpp:29:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for(int i=1;i<=n;i++) scanf("%d", &b[i]);
                           ~~~~~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...