#include <stdlib.h>
#include <stdio.h>
#include "grader.h"
#include "lang.h"
#include <bits/stdc++.h>
using namespace std;
const int mod=65537;
int cnt1[65537][60];
double get1(int i, int j){
int sum=accumulate(cnt1[i], cnt1[i]+60, 0);
if (sum==0) return 0;
return (double)cnt1[i][j]/(double)sum;
}
int cnt2[65537][60];
double get2(int i, int j){
int sum=accumulate(cnt2[i], cnt2[i]+60, 0);
if (sum==0) return 0;
return (double)cnt2[i][j]/(double)sum;
}
int cc[56], tc;
double sum[56];
void excerpt(int *E) {
++tc;
pair<double, int> ans={0, 0};
set<int> st(E, E+10);
for (int j=0; j<56; ++j){
sum[j]=0;
for (int i=0; i<100; ++i) sum[j]+=get1(E[i], j);
for (int i=1; i<100; ++i) sum[j]+=get2((E[i-1]*65536+E[i])%mod, j);
ans=max(ans, {sum[j], j});
}
int real=language(ans.second);
for (int i=0; i<100; ++i) ++cnt1[E[i]%mod][real];
for (int i=1; i<100; ++i) ++cnt2[(E[i-1]*65536+E[i])%mod][real];
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
1112 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
1116 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |