#include<bits/stdc++.h>
#include "grader.h"
#include "lang.h"
using namespace std;
bool s[56][65536];
int A[56];
vector<int> G;
int vis[65536];
const int MOD = 1E9 + 7;
set<int> H[56];
set<int> F[56];
void excerpt(int E[]) {
int ca = 1;
for (int i = 0; i <= 55; i++) {
for (int j = 0; j < 100; j++) {
G.push_back(E[j]);
if (s[i][E[j]] && !vis[E[j]]) {
if (j == 0) A[i] += 1, vis[E[j]] = 1;
else
A[i]++, vis[E[j]] = 1;
if (j != 99 && H[i].find(1ll*E[j]*E[j+1]%MOD) != H[i].end())
A[i] += 1;
}
}
for (int g:G) vis[g] = 0;
G.clear();
}
for (int i = 0; i <= 55; i++)
if (A[i] > A[ca]) ca = i;
memset (A,0,sizeof A);
int d = language(ca);
for (int i = 0; i < 100; i++) {
s[d][E[i]]|=1;
if (i != 99)
H[d].insert(1ll*E[i]*E[i+1] % MOD);
// if (i != 98) F[d].insert(1ll*E[i]*E[i+1] % MOD);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2407 ms |
5592 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
2321 ms |
5572 KB |
Output is partially correct - 66.70% |