Submission #357616

# Submission time Handle Problem Language Result Execution time Memory
357616 2021-01-24T09:07:07 Z Mefarnis Languages (IOI10_languages) C++14
0 / 100
399 ms 8428 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) {
			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 383 ms 8428 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 399 ms 8300 KB Output isn't correct - 1.57%