#include <bits/stdc++.h>
#include "grader.h"
#include "lang.h"
using namespace std;
int a[4][56][300000], b[4][300000];
int cnt[4][300000];
const int MOD = 299993, L = 4;
void excerpt (int* E) {
int n = 100;
memset (cnt, 0, sizeof (cnt));
vector <int> s[5];
for (int i = 0; i < 100; i++) {
int val = 1;
for (int j = 0; j < min (L, n - i); j++) {
val = val * E[i+j] % MOD;
cnt[j][val]++;
s[j].push_back (val);
}
}
double mx = 0;
int x = 0;
for (int i = 0; i < 56; i++) {
double points = 0;
for (int k = 0; k < L; k++) {
for (int j : s[k]) {
if (b[k][j]) points += cnt[k][j] * ((double) a[k][i][j] / b[k][j]) * (K + 1);
}
}
if (mx < points) {
mx = points;
x = i;
}
}
x = language (x);
for (int i = 0; i < 100; i++) {
for (int j = 0; j < min (L, n - i); j++) {
int val = 1;
for (int k = 0; k <= j; k++)
val = val * E[i+k] % MOD;
a[j][x][val]++;
b[j][val]++;
}
}
}
Compilation message
lang.cpp: In function 'void excerpt(int*)':
lang.cpp:32:87: error: 'K' was not declared in this scope
if (b[k][j]) points += cnt[k][j] * ((double) a[k][i][j] / b[k][j]) * (K + 1);
^