Submission #570478

# Submission time Handle Problem Language Result Execution time Memory
570478 2022-05-30T06:23:19 Z AGE Jarvis (COCI19_jarvis) C++14
70 / 70
81 ms 3872 KB
#include<bits/stdc++.h>
#define int long long
#define F first
#define S second
#define pb push_back

using namespace std;
const int N=1e6,M=2e3,mod=1e9+7;
int a[N],b[N];
main()
{
    int n;
    cin>>n;

    map<int,int>mp;

    for(int i=0;i<n;i++)
        cin>>a[i];

    for(int i=0;i<n;i++)
        cin>>b[i],mp[b[i]-a[i]]++;

    int ans=0;

    for(auto x:mp)
        ans=max(ans,x.S);

    cout<<ans<<endl;

    return 0;
}

Compilation message

jarvis.cpp:10:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   10 | main()
      | ^~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 38 ms 2440 KB Output is correct
3 Correct 33 ms 2292 KB Output is correct
4 Correct 34 ms 2252 KB Output is correct
5 Correct 59 ms 3240 KB Output is correct
6 Correct 65 ms 3236 KB Output is correct
7 Correct 67 ms 3192 KB Output is correct
8 Correct 65 ms 3276 KB Output is correct
9 Correct 77 ms 3840 KB Output is correct
10 Correct 81 ms 3872 KB Output is correct