#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++ < 800){
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);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
334 ms |
1408 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
325 ms |
1416 KB |
Output is partially correct - 52.57% |