#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_set <ull> ok[60];
bool vis[60];
inline ll myrand() {
return (1LL * rand() << 15) + rand();
}
void excerpt(int *E) {
int i, j;
unordered_set <ull> mp;
for(i = 0; i + 3 <= 100; i++) {
ull cur = 0;
for(j = i; j < i + 4 && j < 100; j++) {
cur = (cur << 16) + E[j];
if(j - i >= 2) {
mp.insert(cur);
}
}
}
vector <int> arr(56);
int id = -1;
for(auto it : mp) {
for(i = 0; i < 56; i++) {
if(ok[i].find(it) != ok[i].end()) {
arr[i]++;
}
}
}
id = max_element(arr.begin(), arr.end()) - arr.begin();
id = language(id);
for(i = 0; i + 3 <= 100; i++) {
ull cur = 0;
for(j = i; j < i + 4 && j < 100; j++) {
cur = (cur << 16) + E[j];
if(j - i >= 2) {
ok[id].insert(cur);
}
}
}
vis[id] = 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9080 ms |
36424 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
9026 ms |
36444 KB |
Output is partially correct - 89.83% |