#include "grader.cpp"
#include "lang.h"
#include <bits/stdc++.h>
using namespace std;
#define SZ 100
using i64 = int64_t;
using u64 = uint64_t;
int prev[1100000];
#define C(n) \
auto comp ## n = [](const array<int, n>& a){ u64 ans = 0; for(int i : a){ ans <<= 16; ans |= i; } return ans; };\
unordered_map<array<int, n>, array<i64, 56>, decltype(comp ## n)> c ## n(1 << 17, comp ## n)
C(1);
C(2);
C(3);
C(4);
array<i64, 56> cnt;
/*
random_device RD;
i64 A = 0, B = 28, C = 2085, D = 319620;
double highest = 70.23;
/*/
const int A = 0, B = 0, C = 5158, D = 541546;
// */
void excerpt(int *E) {
cnt.fill(0);
for(int i = 0; i <= 100 - 1; i++){
auto& c = c1[{E[i]}];
for(int i = 0; i < 56; i++) cnt[i] += c[i];
}
for(int i = 0; i <= 100 - 2; i++){
auto& c = c2[{E[i], E[i + 1]}];
for(int i = 0; i < 56; i++) cnt[i] += c[i];
}
for(int i = 0; i <= 100 - 3; i++){
auto& c = c3[{E[i], E[i + 1], E[i + 2]}];
for(int i = 0; i < 56; i++) cnt[i] += c[i];
}
for(int i = 0; i <= 100 - 4; i++){
auto& c = c4[{E[i], E[i + 1], E[i + 2], E[i + 3]}];
for(int i = 0; i < 56; i++) cnt[i] += c[i];
}
int ans = language(max_element(cnt.begin(), cnt.end()) - cnt.begin());
for(int i = 0; i <= 100 - 1; i++){
auto& c = c1[{E[i]}];
c[ans] += A;
}
for(int i = 0; i <= 100 - 2; i++){
auto& c = c2[{E[i], E[i + 1]}];
c[ans] += B;
}
for(int i = 0; i <= 100 - 3; i++){
auto& c = c3[{E[i], E[i + 1], E[i + 2]}];
c[ans] += C;
}
for(int i = 0; i <= 100 - 4; i++){
auto& c = c4[{E[i], E[i + 1], E[i + 2], E[i + 3]}];
c[ans] += D;
}
}
template<class T> bool chmax(T& a, const T& b){ if(a <= b){ a = b; return 1; } return 0; }
int main(){
while(1){
c1.clear();
c2.clear();
c3.clear();
c4.clear();
i64 A2 = uniform_int_distribution<i64>(0, A * 2 + 2)(RD);
i64 B2 = uniform_int_distribution<i64>(0, B * 2 + 2)(RD);
i64 C2 = uniform_int_distribution<i64>(0, C * 2 + 2)(RD);
i64 D2 = uniform_int_distribution<i64>(0, D * 2 + 2)(RD);
swap(A, A2);
swap(B, B2);
swap(C, C2);
swap(D, D2);
if(chmax(highest, run())){
cout << A << ' ' << B << ' ' << C << ' ' << D << endl;
}
else{
swap(A, A2);
swap(B, B2);
swap(C, C2);
swap(D, D2);
}
}
}
Compilation message
lang.cpp:1:10: fatal error: grader.cpp: No such file or directory
1 | #include "grader.cpp"
| ^~~~~~~~~~~~
compilation terminated.