Submission #979248

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9792482024-05-10 12:13:06sleepntsheepRainforest Jumps (APIO21_jumps)C++17
81 / 100
699 ms22104 KiB
#pragma GCC optimize("O2,unroll-loops")
#include "jumps.h"
#include<assert.h>
#include <vector>
int subtask = -1;
#define MAX_N 200000
#define MAX_M (2*MAX_N)
int N, head[MAX_N], nxt[MAX_M], vv[MAX_M], ng[MAX_N], pg[MAX_N], HI[MAX_N], H[MAX_N];
int dd[MAX_N], pp[MAX_N], jj[MAX_N], dd_[MAX_N], pp_[MAX_N], jj_[MAX_N];
int dd1[MAX_N],pp1[MAX_N],jj1[MAX_N],ee1[MAX_N];
int dd2[MAX_N],pp2[MAX_N],jj2[MAX_N],ee2[MAX_N];
/*
* dd - high link
* dd_ - low link
* dd1 - left link
* dd2 - right link */
void link(int u, int v)
{
static int i = 1;
nxt[i] = head[u];
vv[i] = v;
head[u] = i++;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...