제출 #1331095

#제출 시각아이디문제언어결과실행 시간메모리
1331095hectormedranoLanguages (IOI10_languages)C++20
70 / 100
143 ms32224 KiB
#include <bits/stdc++.h>
#include "grader.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
using namespace std;
typedef long long ll;

ll t = 0;
vector<vector<ll>> p(65536, vector<ll>(56, 0));
vector<ll> s(65536, 0);

void excerpt(int E[100]){
    vector<double> r(56, double(1));
    for(ll i=0;i<100;i++){
        for(ll j=0;j<55;j++){
            if(s[E[i]] == 0){continue;}
            r[j] *= (1 + double(p[E[i]][j])/double(s[E[i]]));
        }
    }
    double mx = -1;
    ll ans;
    for(ll i=0;i<56;i++){
        if(mx < r[i]){
            mx = r[i];
            ans = i;
        }
    }
    ll L = language(ans);
    for(ll i=0;i<100;i++){
        p[E[i]][L]++;
        s[E[i]]++;
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...