Submission #391549

# Submission time Handle Problem Language Result Execution time Memory
391549 2021-04-19T10:28:37 Z achibasadzishvili Languages (IOI10_languages) C++17
63 / 100
2085 ms 14920 KB
#include<bits/stdc++.h>
#include "grader.h"
#include "lang.h"
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
int *e,n=100;
double chance[200];
map<int,int>t[60],used;
void excerpt(int *_e){
    e = _e;
    for(int i=0; i<56; i++){
        chance[i] = 0;
    }
    for(int i=0; i<100; i++){
        int k = e[i];
        for(int j=0; j<56; j++){
            chance[j] += 10.0 * (double)t[j][k] / (double)used[k];
        }
    }
    ll mx = -1,got = 0;
    for(int i=0; i<56; i++){
        if(chance[i] > mx){
            mx = chance[i];
            got = i;
        }
    }
    
    int ans = language(got);
    
    for(int i=0; i<100; i++){
        used[e[i]]++;
        t[ans][e[i]]++;
    }
}
# Verdict Execution time Memory Grader output
1 Correct 2079 ms 14920 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 2085 ms 14856 KB Output is partially correct - 58.72%