This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |