Submission #588208

#TimeUsernameProblemLanguageResultExecution timeMemory
588208CaroLindaLanguages (IOI10_languages)C++14
0 / 100
572 ms2804 KiB
#include <bits/stdc++.h> #include "grader.h" #include "lang.h" const int MAX_SYMBOLS = 65545; using namespace std; int freq[MAX_SYMBOLS]; vector<int> lan[MAX_SYMBOLS]; void excerpt(int *E) { srand(time(0)); vector<int> space(56); iota(space.begin(),space.end(),0); for(int i = 0; i < 100; i++) freq[E[i]]++; for(int i = 0; i < 100; i++){ if(lan[E[i]].empty()) continue; if(lan[E[i]].size() < space.size()) swap(space, lan[E[i]]); } int aux = rand() % space.size(); int actualAnswer = language(space[aux]); for(int i = 0; i < 100; i++){ vector<int> &ptr = lan[E[i]]; ptr.push_back(actualAnswer); sort(ptr.begin(), ptr.end()); ptr.erase(unique(ptr.begin(),ptr.end()), ptr.end()); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...