제출 #391545

#제출 시각아이디문제언어결과실행 시간메모리
391545achibasadzishviliLanguages (IOI10_languages)C++17
0 / 100
10083 ms17072 KiB
#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];
int t[65635][57],q[66535];
void excerpt(int *_e){
    e = _e;
    for(int i=0; i<56; i++){
        chance[i] = 0;
    }
    for(int i=1; i<=65535; i++){
        q[i] = 0;
        for(int j=0; j<56; j++)
            t[i][j] = 0;
    }
    for(int i=0; i<100; i++){
        int k = e[i];
        for(int j=0; j<56; j++){
            chance[j] += 10 * (double)t[k][j] / (double)q[e[i]];
        }
    }
    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++){
        q[e[i]]++;
        t[e[i]][ans]++;
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...