#include<bits/stdc++.h>
#include "grader.h"
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
int V[56][65536];
unordered_map<ulint,bool>Y[56];
void excerpt(int *E)
{
int l=0,maxi=0;
vector<ulint>P;
for(int i=0;i<97;i++)
{
P.push_back(1llu*E[i]*(1llu<<48)+1llu*E[i+1]*(1llu<<32)+1llu*E[i+2]*(1llu<<16)+E[i+3]);
}
for(int i=0;i<98;i++)
{
P.push_back(1llu*E[i]*(1ll<<32)+1llu*E[i+1]*(1llu<<16)+E[i+2]);
}
for(int i=0;i<99;i++)
{
P.push_back(1llu*E[i]*(1llu<<16)+E[i+1]);
}
for(int j=0;j<56;j++)
{
int kind=0;
for(auto &i:P)
{
if(Y[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++)
{
Y[L][1llu*E[i]*(1llu<<16)+E[i+1]]=1;
}
for(int i=0;i<98;i++)
{
Y[L][1llu*E[i]*(1ll<<32)+1llu*E[i+1]*(1llu<<16)+E[i+2]]=1;
}
for(int i=0;i<97;i++)
{
Y[L][1llu*E[i]*(1llu<<48)+1llu*E[i+1]*(1llu<<32)+1llu*E[i+2]*(1llu<<16)+E[i+3]]=1;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2573 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2526 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |