Submission #67887

# Submission time Handle Problem Language Result Execution time Memory
67887 2018-08-15T11:56:47 Z mhs4670 Languages (IOI10_languages) C
55 / 100
364 ms 1504 KB
#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);
	}
}
# Verdict Execution time Memory Grader output
1 Correct 364 ms 1504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 325 ms 1496 KB Output is partially correct - 52.30%