Submission #445100

# Submission time Handle Problem Language Result Execution time Memory
445100 2021-07-16T12:29:14 Z Abrar_Al_Samit Jarvis (COCI19_jarvis) C++17
70 / 70
49 ms 2008 KB
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;


#define debug(x) cerr << '[' << (#x) << "] = " << x << '\n';

template<class T> using ordered_set = tree<T, null_type , less<T> , rb_tree_tag , tree_order_statistics_node_update> ;

void PlayGround() {
    int n; cin >> n;
    int a[n], b[n];
    for(auto& it : a) cin >> it;
    for(auto& it : b) cin >> it;
    int ans = 0;
    map<int,int>dif;
    for(int i=0; i<n; ++i) dif[a[i]-b[i]]++, ans = max(ans, dif[a[i]-b[i]]);
    cout << ans << '\n';

    #ifndef ONLINE_JUDGE
        cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
    #endif
} 
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
   // #ifndef ONLINE_JUDGE
   //     freopen("input.txt", "r", stdin);
 //  #endif
    PlayGround();

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 19 ms 1348 KB Output is correct
3 Correct 20 ms 1228 KB Output is correct
4 Correct 18 ms 1228 KB Output is correct
5 Correct 25 ms 1564 KB Output is correct
6 Correct 26 ms 1484 KB Output is correct
7 Correct 31 ms 1488 KB Output is correct
8 Correct 30 ms 1516 KB Output is correct
9 Correct 49 ms 1936 KB Output is correct
10 Correct 46 ms 2008 KB Output is correct