# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
936150 | shoryu386 | The Xana coup (BOI21_xanadu) | C++17 | 112 ms | 25232 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 int long long
#define MAX 100007
int n;
vector<int> adj[MAX];
int dp[MAX][2][2];
int active[MAX];
bool comp(pair<int, int> a, pair<int, int> b){
return a.second - a.first < b.second - b.first;
}
void dfs(int x, int p){
for (auto y : adj[x]){ if (y == p) continue;
dfs(y, x);
}
//we want to find the min presses to make even, and min presses to make odd
if (true){
vector<pair<int, int>> competition;
int cursum = 0;
for (auto y : adj[x]){ if (y == p) continue;
competition.push_back({dp[y][0][0], dp[y][1][0]});
cursum += dp[y][0][0];
}
int evenbest = cursum, oddbest = INT_MAX;
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... |