# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1028131 | DangerNoodle7591 | Trampoline (info1cup20_trampoline) | C++17 | 815 ms | 77076 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define int long long int
#define endl '\n'
#define N 200100
#define M 30
#define big 2147483647
#define bigg 9223372036854775807
#define pb push_back
#define p push
#define ins insert
#define f first
#define s second
int lca[N][M];
vector<int> adj[N], comprez;
vector<pair<int,int>> ikinci;
int gittik[N];
void dfs(int x,int a,int b){
if(gittik[x])return ;
gittik[x]=1;
lca[x][0]=lca[x][1]=x;
pair<int,int> pa={a+1,b};
int yeni=(lower_bound(ikinci.begin(),ikinci.end(),pa)-ikinci.begin());
if(yeni!=ikinci.size()&&ikinci[yeni].f==a+1&&gittik[yeni]==0){
lca[x][1]=yeni;
dfs(yeni,a+1,ikinci[yeni].s);
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |