제출 #201513

#제출 시각아이디문제언어결과실행 시간메모리
201513luciocfLanguages (IOI10_languages)C++14
0 / 100
1653 ms4876 KiB
#include <bits/stdc++.h>

#include "grader.h"
#include "lang.h"

#define SZ 100

using namespace std;

const int maxn = 1e4+10;

int ant[1100000];
int lang[maxn];

int vez;

void excerpt(int *E)
{
	++vez;

	for (int i = 1; i <= 100; i++)
		ant[(vez-1)*100 + i] = E[i-1];

	if (vez == 1)
	{
		lang[vez] = language(1);
		return;
	}

	int opt = 1;
	int mx_ig = 0;

	for (int i = 0; i < vez-1; i++)
	{
		int qtd_ig = 0;

		for (int j = 1; j <= 100; j++)
			qtd_ig += (ant[i*100 + j] == E[i-1]);
		
		if (qtd_ig > mx_ig)
			opt = lang[i+1], mx_ig = qtd_ig;
	}

	lang[vez] = language(opt);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...