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 "grader.h"
#include "lang.h"
#include <unordered_map>
#include <vector>
const int len = 6;
std::unordered_map<long long,std::vector<char> > M[len];
int t[56];
void excerpt(int *E)
{
std::vector<char> a;
long long hs;
int i,j,k,r;
for(j=0;j<56;j++)t[j]=0;
for(i=0;i<100;i++)
{
hs=0;
for(j=0;j<len&&i+j<100;j++)
{
hs=hs*77777LL+E[i+j];
if(M[j].find(hs)!=M[j].end())
{
a=M[j][hs];
for(k=0;k<56;k++)if(a[k])t[k]++;
}
}
}
r=0;
for(i=0;i<56;i++)if(t[i]>=t[r])r=i;
r=language(r);
a.clear();
a.resize(56,0);
for(i=0;i<100;i++)
{
hs=0;
for(j=0;j<len&&i+j<100;j++)
{
hs=hs*77777LL+E[i+j];
if(M[j].find(hs)==M[j].end())M[j][hs]=a;
M[j][hs][r]=1;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |