# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445028 | Dipra_Irham | Jarvis (COCI19_jarvis) | C++17 | 49 ms | 3000 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
#define pb(x) push_back(x)
#define fil(x, y) memset(x, y, sizeof(x))
#define ll long long
#define ff first
#define ss second
#define printp(x) x.ff << " " << x.ss
#define pii pair<int,int>
#define pll pair<long long,long long>
#define mp(x, y) make_pair(x,y)
#define inf 1073741823
#define infll 4611686018427387903
#define M 1000000007
#define db(x) cout << x << " ";
#define N 200007
#define sz size
#define sm 0.0000007
#define ins insert
#define ers erase
#define all(k) k.begin(), k.end()
#define cnt count
#define fastio ios_base::sync_with_stdio(0);cin.tie(0)
using namespace std;
int main()
{
fastio;
int n;
cin >> n;
int a[n];
int b[n];
for(int i = 0;i < n;i++)
{
cin >> a[i];
}
for(int i = 0;i < n;i++)
{
cin >> b[i];
}
vector <int> mn;
map <int, int> amio;
for(int i = 0;i < n;i++)
{
int x = b[i] - a[i];
if(amio[x] == 0)
mn.pb(x);
amio[x]++;
}
int mx = -inf;
for(int i = 0;i < mn.sz();i++)
{
mx = max(mx, amio[mn[i]]);
}
cout << mx << endl;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |