#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
typedef long long lint;
int V[56][65536];
map<lint,int>W[56];
map<lint,int>X[56];
void excerpt(int *E)
{
int l=0,maxi=0;
vector<lint>U;
for(int i=0;i<98;i++)
{
U.push_back(1ll*E[i]*65536*65536+1ll*E[i+1]*65536+E[i+2]);
}
sort(U.begin(),U.end());
U.erase(unique(U.begin(),U.end()),U.end());
for(int j=0;j<56;j++)
{
int kind=0;
for(auto &i:U)
{
if(X[j][i])kind++;
}
if(kind>maxi)
{
maxi=kind;
l=j;
}
}
if(maxi==0){
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());
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;
}
}
if(maxi==0)
{
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;
}
}
}
}
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]]++;
}
for(int i=0;i<98;i++)
{
X[L][1ll*E[i]*65536*65536+1ll*E[i+1]*65536+E[i+2]]++;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
5035 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
5298 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |