This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
typedef long long lint;
int V[56][65536];
map<lint,int>W[56];
void excerpt(int *E)
{
int l=0,maxi;
vector<lint>T;
for(int i=0;i<99;i++)
{
T.push_back(1ll*E[i]*65536+E[i+1]);
}
sort(T.begin(),T.end());
T.erase(unique(T.begin(),T.end()),T.end());
vector<int>S;
for(int i=0;i<100;i++)S.push_back(E[i]);
sort(S.begin(),S.end());
S.erase(unique(S.begin(),S.end()),S.end());
maxi=-1;
for(int j=0;j<56;j++)
{
int kind=0;
for(auto &i:S)
{
if(V[j][i])kind++;
}
if(kind>maxi)
{
maxi=kind;
l=j;
}
}
vector<int>N;
for(int j=0;j<56;j++)
{
int kind=0;
for(auto &i:S)
{
if(V[j][i])kind++;
}
if(kind==maxi)
{
N.push_back(j);
}
}
for(auto &j:N)
{
maxi=0;
for(int j=0;j<56;j++)
{
int kind=0;
for(auto &i:T)
{
if(W[j][i])kind++;
}
if(kind>maxi)
{
maxi=kind;
l=j;
}
}
}
int L=language(l);
for(int i=0;i<100;i++)
{
V[L][E[i]]++;
}
for(int i=0;i<99;i++)
{
W[L][1ll*E[i]*65536+E[i+1]]++;
}
}
Compilation message (stderr)
lang.cpp: In function 'void excerpt(int*)':
lang.cpp:49:13: warning: unused variable 'j' [-Wunused-variable]
49 | for(auto &j:N)
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |