#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1379 ms |
5968 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
1446 ms |
5972 KB |
Output is partially correct - 53.19% |