Submission #357619

# Submission time Handle Problem Language Result Execution time Memory
357619 2021-01-24T09:08:14 Z Mefarnis Languages (IOI10_languages) C++14
0 / 100
407 ms 2916 KB
#include <bits/stdc++.h>
#include "grader.h"
#define maxl 56
#define maxc 100
#define maxt 65536
#define pb push_back
using namespace std;

int cnt[maxl][maxt];

void excerpt(int tokens[maxc]) {
	int score[maxl];
	memset(score,0,sizeof(score));
	for( int i = 0 ; i < maxc ; i++ )
		for( int l = 0 ; l < maxl ; l++ )
			score[l] += cnt[l][tokens[i]];
	int bestScore = -1;
	vector<int> candidates;
	for( int l = 0 ; l < maxl ; l++ )
		if(score[l] > bestScore) {
			bestScore = score[l];
			candidates.clear();
			candidates.pb(l);
		}
		else if(score[l] == bestScore)
			candidates.pb(l);
	int sz = candidates.size();
	srand(time(NULL));
	int l = candidates[rand()%sz];
	l = language(l);
	for( int i = 0 ; i < maxc ; i++ )
		cnt[l][tokens[i]]++;
}
# Verdict Execution time Memory Grader output
1 Incorrect 396 ms 2868 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 407 ms 2916 KB Output isn't correct - 26.37%