# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1054090 | Apiram | Jobs (BOI24_jobs) | C++14 | 106 ms | 71108 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.
/*
* author : Apiram
* created: 11.08.2024 14:11:10
*/
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
long long n,s;cin>>n>>s;
vector<pair<long long,long long>>arr(n + 1);
vector<vector<long long>>adj(n + 1);
for (long long i = 1;i<=n;++i){
cin>>arr[i].first>>arr[i].second;
adj[arr[i].second].push_back(i);
}
vector<pair<long long,long long>>pos;
function<int(long long,long long,long long,long long,long long)>dfs = [&](long long u,long long mn,long long cost,long long got,long long mx){
int ans = 0;
if (cost - got > 0){
pos.push_back({mn - mx,cost - got});
got = cost;
mx = cost;
ans++;
}
for(auto x:adj[u]){
if (ans){
got = cost;
# | 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... |