Submission #146387

#TimeUsernameProblemLanguageResultExecution timeMemory
146387popovicirobertLanguages (IOI10_languages)C++14
0 / 100
2746 ms262148 KiB
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long using namespace std; #include "grader.h" #include "lang.h" #define SZ 100 const int B = (int) 1e5; unordered_map <ull, bool> ok[60]; bool vis[60]; inline ll myrand() { return (1LL * rand() << 15) + rand(); } void excerpt(int *E) { int i, j; unordered_map <ull, bool> mp; for(i = 0; i + 4 <= 100; i++) { ull cur = 0; for(j = i; j < i + 4; j++) { cur = (cur << 16) + E[j]; } mp[cur] = 1; } vector <int> arr(56); int id = -1; for(auto it : mp) { for(i = 0; i < 56; i++) { if(ok[i][it.first]) { arr[i]++; } } } id = max_element(arr.begin(), arr.end()) - arr.begin(); id = language(id); for(i = 0; i + 4 <= 100; i++) { ull cur = 0; for(j = i; j < i + 4; j++) { cur = (cur << 16) + E[j]; } ok[id][cur] = 1; } vis[id] = 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...