This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdlib.h>
#include <stdio.h>
#include "grader.h"
#include "lang.h"
#include <bits/stdc++.h>
using namespace std;
int cnt[65535][60];
double get(int i, int j){
int sum=accumulate(cnt[i], cnt[i]+60, 0);
if (sum==0) return 0;
return (double)cnt[i][j]/(double)sum;
}
void excerpt(int *E) {
pair<double, int> ans={0, 0};
for (int j=0; j<56; ++j){
double sum=0;
for (int i=0; i<100; ++i){
sum+=get(E[i], j);
}
ans=max(ans, {sum, j});
}
int real=language(ans.second);
for (int i=0; i<100; ++i) cnt[E[i]][real]=1;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |