Submission #888449

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8884492023-12-17 12:36:32HakiersCrossing (JOI21_crossing)C++17
100 / 100
340 ms40160 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr int MAXN = 2e5 + 7;
constexpr int BASE = 1 << 18;
constexpr ll mod = 1e9 + 7;
constexpr ll P = 7;
map<ll, bool> mapa;
int GENE[MAXN][3];
int gen[MAXN][9];
int wzorzec[MAXN];
ll TREE[BASE << 1];
ll LAZY[BASE << 1];
ll pot[BASE];
ll sumpot[BASE];
int n, q;
void generate(){
// -(A+B)
for(int i = 1; i <= n; i++)
gen[i][0] = (-(GENE[i][0] + GENE[i][1]) + 6)%3;
// -(A+C)
for(int i = 1; i <= n; i++)
gen[i][1] = (-(GENE[i][0] + GENE[i][2]) + 6)%3;
// -(B+C)
for(int i = 1; i <= n; i++)
gen[i][2] = (-(GENE[i][1] + GENE[i][2]) + 6)%3;
// (A+B-C)
for(int i = 1; i <= n; i++)
gen[i][3] = ((GENE[i][0] + GENE[i][1] - GENE[i][2]) + 6)%3;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...