# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
363373 | cig32 | Languages (IOI10_languages) | C++17 | 282 ms | 6120 KiB |
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 "bits/stdc++.h"
#include "lang.h"
#include "grader.h"
using namespace std;
int word[65536][56];
int totcnt[65536];
void excerpt(int *a){
double s[56];
double m=0;
for(int j=0;j<56;j++)s[j]=0;
for(int j=0;j<100;j++){
for(int k=0;k<56;k++){
if(totcnt[a[j]])s[k]+=word[a[j]][k]*1.0/totcnt[a[j]];
m=max(m,s[k]);
}
}
for(int j=0;j<100;j++){
totcnt[a[j]]++;
}
int ans;
for(int j=0;j<56;j++){
if(s[j]==m){
ans=language(j);
break;
}
}
for(int j=0;j<100;j++){
word[a[j]][ans]++;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |