Submission #512766

#TimeUsernameProblemLanguageResultExecution timeMemory
512766lovro_nidogon1Languages (IOI10_languages)C++14
73 / 100
8055 ms16080 KiB
#include<bits/stdc++.h> #include "lang.h" #include "grader.h" using namespace std; short freq[56][70001], nocur[56], cfreq[70001]; const short cum = 2; set<pair<short, short> > ses[56]; set<pair<short, pair<short, short> > > sussy[56]; void excerpt(int *e) { short exp = 0; short sd = 0; for(short i = 0; i < 56; i++) { short csd = 0; for(short j = 0; j < 100; j++) csd += 69 * freq[i][e[j]]; for(short j = 0; j < 99; j++) csd += 100 * (ses[i].find({e[j], e[j + 1]}) != ses[i].end()); for(short j = i%2; j < 98; j+=cum) csd += 420 * (sussy[i].find({e[j], {e[j + 1], e[j + 2]}}) != sussy[i].end()); if(csd > sd) sd = csd, exp = i; } short ca = language(exp); for(short i = 0; i < 100; i++) freq[ca][e[i]] = 1; for(short i = 0; i < 99; i++) ses[ca].insert({e[i], e[i + 1]}); for(short i = exp%2; i < 98; i+=cum) sussy[ca].insert({e[i], {e[i + 1], e[i + 2]}}); nocur[ca]++; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...