# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
44979 | junodeveloper | Languages (IOI10_languages) | C++14 | 1254 ms | 15088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "lang.h"
#include "grader.h"
#include <map>
#include <algorithm>
using namespace std;
typedef unsigned long long ll;
map<ll, int> mp[56];
ll cnt[56] = {0};
void excerpt(int* a) {
for(int i=0; i<56; i++) cnt[i] = 0;
for(int i=0; i<97; i++) {
ll val = 0;
for(int j=0; j<4; j++)
val = val * 65535 + a[i] - 1;
int mx = 0, idx = 0;
for(int j=0; j<56; j++)
cnt[j] += mp[j][val];
}
int ret = max_element(cnt, cnt+56) - cnt;
int ans = language(ret);
for(int i=0; i<97; i++) {
ll val = 0;
for(int j=0; j<4; j++)
val = val * 65535 + a[i] - 1;
mp[ans][val]++;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |