답안 #226685

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
226685 2020-04-24T19:53:43 Z anubhavdhar Jarvis (COCI19_jarvis) C++14
70 / 70
116 ms 3960 KB
#include<bits/stdc++.h>

#define ll long long int
#define pb push_back
#define mp make_pair
#define FOR(i,n) for(i=0;i<(n);++i)
#define FORe(i,n) for(i=1;i<=(n);++i)
#define FORr(i,a,b) for(i=(a);i<(b);++i)
#define FORrev(i,n) for(i=(n);i>=0;--i)
#define ii pair<ll,ll>
#define vi vector<ll>
#define vii vector<ii>
#define ff first 
#define ss second
#define cd complex<double>
#define vcd vector<cd>
#define ldd long double
#define all(x) (x).begin(),(x).end()

using namespace std;

const short int __PRECISION = 10;

const ll MOD = 1e9+7;
const ll INF = 1e17 + 1101;
const ll LOGN = 17;
const ll MAXN = 2e5+5;
const ll ROOTN = 320;

const ldd PI = acos(-1);
const ldd EPS = 1e-7;

int main()
{
	/*
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	*/
	ll i,N,ans = 0;
	cin>>N;
	ll A[N],B[N];
	map<ll,ll> m;
	FOR(i,N)
		cin>>A[i];
	FOR(i,N)
	{
		cin>>B[i];
		m[B[i] - A[i]]++;
	}

	for(map<ll,ll> :: iterator it = m.begin();it != m.end(); it++)
		ans = max(ans,it->ss);
	cout<<ans;
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 52 ms 2296 KB Output is correct
3 Correct 52 ms 2428 KB Output is correct
4 Correct 51 ms 2296 KB Output is correct
5 Correct 98 ms 3320 KB Output is correct
6 Correct 102 ms 3320 KB Output is correct
7 Correct 107 ms 3320 KB Output is correct
8 Correct 103 ms 3320 KB Output is correct
9 Correct 116 ms 3960 KB Output is correct
10 Correct 115 ms 3932 KB Output is correct