Submission #706491

#TimeUsernameProblemLanguageResultExecution timeMemory
706491SamNguyenLanguages (IOI10_languages)C++14
56 / 100
1791 ms6300 KiB
#include <stdlib.h> #include <stdio.h> #include "grader.h" #include "lang.h" #include <bits/stdc++.h> using namespace std; template <class T1, class T2> inline bool maximise(T1 &x, T2 y) { if (x < y) { x = y; return true; } return false; } const int LEN = 100; const int NUM_LANG = 56; set<int> alphabets[NUM_LANG]; void excerpt(int *txt) { int best = -1, lang = -1; for (int x = 0; x < NUM_LANG; x++) { int cnt = 0; for (int i = 0; i < LEN; i++) if (alphabets[x].count(txt[i])) cnt++; if (maximise(best, cnt)) lang = x; } int ans = language(lang); for (int i = 0; i < LEN; i++) alphabets[ans].insert(txt[i]); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...