#include <stdlib.h>
#include <stdio.h>
#include "grader.h"
#include "lang.h"
#define SZ 100
//int prev[1100000];
int cnt;
int frequency[56][65535 + 1];
int done[56];
void excerpt(int *E) {
//prev[E[0]] = language(prev[E[0]]);
//printf("cnt:%d\n", cnt);
if (cnt++ < 1000){
int ans = language(0);
//if (done[ans]) return;
//else done[ans]++;
for (int i = 0; i < SZ; i++)frequency[ans][E[i]] = 1;
}
else{
int max = 0, L = 0;
for (int i = 0; i < 56; i++){
int cnt = 0;
for (int j = 0; j < SZ; j++){
if (frequency[i][E[j]])cnt++;
}
if (cnt > max)max = cnt, L = i;
}
language(L);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
364 ms |
1504 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
325 ms |
1496 KB |
Output is partially correct - 52.30% |