Submission #632372

#TimeUsernameProblemLanguageResultExecution timeMemory
632372ggohLanguages (IOI10_languages)C++14
0 / 100
10089 ms25932 KiB
#include<bits/stdc++.h> #include "grader.h" using namespace std; typedef long long lint; typedef unsigned long long ulint; int V[56][65536]; set<lint>Y[56]; lint h[102]; void excerpt(int *E) { int l=0,maxi=-1; vector<lint>P; for(int i=0;i<100;i++)h[i]=0; for(int k=0;k<4;k++) { for(int i=99;i>=k;i--) { if(i==0)h[i]=E[i]; else h[i]=h[i-1]*65537+E[i]; P.push_back(h[i]); } } sort(P.begin(),P.end()); P.erase(unique(P.begin(),P.end()),P.end()); for(int j=0;j<56;j++) { int kind=0; for(auto &i:P) { if(Y[j].find(i)!=Y[j].end())kind++; } if(kind>maxi) { maxi=kind; l=j; } } int L=language(l); for(int i=0;i<100;i++)h[i]=0; if(Y[L].size()<10000){ for(int k=0;k<4;k++) { for(int i=99;i>=k;i--) { if(i==0)h[i]=E[i]; else h[i]=h[i-1]*65537+E[i]; Y[L].insert(h[i]); } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...