#include <stdlib.h>
#include <stdio.h>
#include "grader.h"
#include "lang.h"
#include <bits/stdc++.h>
using namespace std;
const int mod=100003;
int cnt[10][mod][60];
int get(int h, int i, int j){
return min(cnt[h][i][j], h);
}
int cc[56], tc;
int sum[56];
int a[10][100];
void excerpt(int *E) {
++tc;
for (int h=0; h<4; ++h) for (int i=h; i<100; ++i){
if (h==0) a[h][i]=E[i];
else a[h][i]=(1ll*a[h-1][i-1]*65536+E[i])%mod;
}
pair<int, int> ans={0, 0};
for (int j=0; j<56; ++j){
sum[j]=0;
for (int h=0; h<4; ++h) for (int i=h; i<100; ++i){
sum[j]+=get(h, a[h][i], j);
}
ans=max(ans, {sum[j], j});
}
int real=language(ans.second);
for (int h=0; h<4; ++h) for (int i=h; i<100; ++i){
++cnt[h][a[h][i]][real];
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
517 ms |
81088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
505 ms |
81228 KB |
Output is partially correct - 90.59% |