답안 #314612

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
314612 2020-10-20T12:59:03 Z neki Jarvis (COCI19_jarvis) C++14
70 / 70
164 ms 2680 KB
#include <bits/stdc++.h>
#define loop(i, a, b) for(long long i=a;i<b;i++)
#define pool(i, a, b) for(long long i=a-1;i>=b;i--)
#define fore(i, a) for(auto&& i:a)
#define fi first
#define se second
#define ps(a) push_back(a)
#define pb(a) pop_back(a)
#define sc scanf
#define vc vector
#define pa pair<ll, ll>
#define ll long long
#define lb lower_bound
#define ub upper_bound
#define all(a) a.begin(), a.end()
#define llmax LLONG_MAX/2
#define llmin -LLONG_MAX/2
using namespace std;
#define mn 2600000
#define pa pair<ll, ll>
#define ld long double 
ll a[mn], b[mn];
map<ll, ll> dp;
int main(){
    ll n;cin >> n;
    loop(i, 0, n) cin >> a[i];
    loop(i, 0, n) cin >> b[i];
    loop(i, 0, n) dp[a[i]-b[i]]++;
    ll ans=0;
    fore(v, dp) ans=max(ans, v.se);
    cout << ans <<endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 62 ms 1912 KB Output is correct
3 Correct 63 ms 1912 KB Output is correct
4 Correct 60 ms 1912 KB Output is correct
5 Correct 132 ms 1912 KB Output is correct
6 Correct 136 ms 2040 KB Output is correct
7 Correct 135 ms 1912 KB Output is correct
8 Correct 135 ms 1912 KB Output is correct
9 Correct 164 ms 2680 KB Output is correct
10 Correct 150 ms 2556 KB Output is correct