Submission #8136

# Submission time Handle Problem Language Result Execution time Memory
8136 2014-08-31T07:38:25 Z gs13073 Languages (IOI10_languages) C++
56 / 100
489 ms 3040 KB
#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 time Memory Grader output
1 Correct 306 ms 2936 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 489 ms 3040 KB Output is partially correct - 52.91%