#include"lang.h"
#include"grader.h"
#include<bits/stdc++.h>
#define cir(i,a,b) for(int i=a;i<b;++i)
using namespace std;
using ulint=unsigned long long;
unordered_map<int,unordered_set<ulint>> crsap;
void excerpt(int*a){
const auto len=100;
unordered_map<int,int> prob;
cir(i,0,len-1){
const auto hashx=(a[i]<<16)|(a[i+1]);
for(auto&[ax,bx]:crsap) prob[ax]+=bx.count(hashx);
}
cir(i,0,len-2){
const auto hashx=((ulint)(a[i])<<32)|(a[i+1]<<16)|a[i+2];
for(auto&[ax,bx]:crsap) prob[ax]+=bx.count(hashx);
}
pair<int,int> hx={-1,1};
for(auto&[ax,bx]:prob) hx=max(hx,{bx,ax});
const auto ql=language(hx.second);
cir(i,0,len-1){
const auto hashx=(a[i]<<16)|(a[i+1]);
crsap[ql].insert(hashx);
}
cir(i,0,len-2){
const auto hashx=((ulint)(a[i])<<32)|(a[i+1]<<16)|a[i+2];
crsap[ql].insert(hashx);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4313 ms |
16980 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
4202 ms |
17056 KB |
Output is partially correct - 87.20% |