#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 |
1 |
Runtime error |
1653 ms |
4664 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1494 ms |
4876 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |