#include "lang.h"
#include "grader.h"
#include <map>
#include <algorithm>
using namespace std;
typedef unsigned long long ll;
map<ll, int> mp[56];
void excerpt(int* a) {
int cnt[56] = {0};
for(int i=0; i<96; 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++)
if(mx < mp[j][val])
mx = mp[j][val], idx = j;
cnt[idx]++;
}
int ret = max_element(cnt, cnt+56) - cnt;
int ans = language(ret);
for(int i=0; i<96; i++) {
ll val = 0;
for(int j=0; j<4; j++)
val = val * 65535 + a[i] - 1;
mp[ans][val]++;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1238 ms |
14952 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1227 ms |
14948 KB |
Output is partially correct - 33.37% |