#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()
int main(){
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int n,k;
cin>>n>>k;
int l[n];
for(int i=0;i<n;i++){
cin>>l[i];
}
int b[n];
b[0]=-1;
for(int i=1;i<n-1;i++){
cin>>b[i];
}
int ans=0;
vector<int>cnt(k,0);
for(int i=n-1;i>=0;i--){
cnt[l[i]]++;
ans=max(ans,cnt[l[i]]);
}
cout<<ans<<' '<<0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |