Submission #99889

#TimeUsernameProblemLanguageResultExecution timeMemory
99889jvalsortavJarvis (COCI19_jarvis)C++14
70 / 70
117 ms2076 KiB
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
#include <ctime>
#include <set>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <utility>
#include <string>
#include <map>
//#include <sve_includeove>

using namespace std;

int n, mx, k;
vector <int> a, b;
set <int> s;
map <int, int> m;
int main() {
	
	cin >> n;
	
	for (int i = 0; i < n; i++){
		cin >> k;
		a.push_back(k);
	}
	
	for (int i = 0; i < n; i++){
		cin >> k;
		b.push_back(k);
	}
	
	for (int i = 0; i < n; i++){
		s.insert(b[i] - a[i]);
		m[b[i] - a[i]]++;
	}
	
	for (set <int> :: iterator it = s.begin(); it != s.end(); it++){
		mx = max(mx, m[*it]);
	}
	
	cout << mx;



return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...