Submission #1065034

#TimeUsernameProblemLanguageResultExecution timeMemory
1065034anangoJobs (BOI24_jobs)C++17
0 / 100
7 ms14684 KiB
// // Created by adavy on 8/18/2024. // #include <bits/stdc++.h> //#pragma GCC optimize("O3") using namespace std; using ll = long long; const ll MOD = 1e9 + 7; //#define int ll #define f first #define s second vector<vector<int>> adj; void dfs(int v, int p){ cout << "v: " << v << endl; //int maxsz = -1, maxch = -1; for(int u:adj[v]){ if (u == p) continue; dfs(u,v); } } signed main(){ int N,s; cin >> N >> s; adj.resize(N+5); for(int i=1;i<=N;++i){ ll x,p; cin >> x >> p; //val[i] = x; adj[p].push_back(i); adj[i].push_back(p); } dfs(1,-1); //int t = s; /* for(auto& item:sets[which[0]].ps){ if (t >= item.f){ t -= item.f; t += item.s; } }*/ //cout << t-s << endl; }
#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...