제출 #8136

#제출 시각아이디문제언어결과실행 시간메모리
8136gs13073Languages (IOI10_languages)C++98
56 / 100
489 ms3040 KiB
#include <stdlib.h>
#include <stdio.h>

#include "grader.h"
#include "lang.h"

#define SZ 100

int lang[57][65540];

void excerpt(int *E) {
    int i,j;
    int guess=26;
    int maxmatch=0;
    for(j=0;j<56;j++){
        int tmp=0;
        for(i=0;i<100;i++){
            if(lang[j][E[i]])tmp++;
            //tmp+=lang[j][E[i]];
        }
        if(tmp>maxmatch){
            maxmatch=tmp;
            guess=j;
        }
    }
    int real = language(guess);
    for(i=0;i<100;i++){
        lang[real][E[i]]++;
    }
    return;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...