标签:end cassert int 通过 force 大于 with 绝对值 stream
#include <cstdio>
#include <algorithm>
#include<iomanip>
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <queue>
#include <cstring>
#include<stack>
#include <cassert>
#include<map>
using namespace std;
typedef long long LL;
LL n, k, m ;
LL i,j,g;
vector<int >v[N],num[N];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int t;
cin>>t;
for(int i= 1;i<=t;i++)cin >>ar[i],v[ar[i]].push_back(i);
for(int i= 1;i<=t;i++){
cin >>br[i];
cr[(i-v[br[i]][0]+t)%t]++;
}
LL ma = 0 ;
for(int i= 0;i<=t-1;i++){
ma =max(ma, cr[i]);
}
cout<<ma<<endl;
return 0;
}
标签:end cassert int 通过 force 大于 with 绝对值 stream
原文地址:https://www.cnblogs.com/QFNU-ACM/p/13364846.html