Submission #1012347

#TimeUsernameProblemLanguageResultExecution timeMemory
1012347huutuanLanguages (IOI10_languages)C++14
56 / 100
1446 ms5972 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...