# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1133367 | why1 | Birthday gift (IZhO18_treearray) | C++20 | 12 ms | 23876 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll unsigned long long
#define pb push_back
#define pii pair<int,int>
#define sz size()
#define all(v) v.begin(),v.end()
#define fi first
#define se second
const int N = 2e5;
const int mod = 998244353;
const int INF = 1e9;
const int di[]={1,-1,0,0};
const int dj[]={0,0,1,-1};
int n,m,q;
int a[N+1];
vector<int> g[N+1];
int tin[N+1],tout[N+1];
int up[N+1][20],timer=1;
set<int> st[N+1],sgl[N+1];
void dfs(int v,int pr){
tin[v]=timer++;
up[v][0]=pr;
for(int i = 1; i < 20; i++){
up[v][i]=up[up[v][i-1]][i-1];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |