# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1062790 | vuavisao | Jobs (BOI24_jobs) | C++17 | 90 ms | 32816 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>
#pragma GCC optimize("O3", "unroll-loops")
using namespace std;
using ll = long long;
const int N = 300'000 + 10;
const ll INF = 1'000'000'000'000'000'000;
int n;
ll s;
vector<int> g[N];
ll cost[N];
int parent[N];
namespace sub1 {
bool check() {
return (s == INF);
}
ll dp[N];
void dfs(int u) {
dp[u] = cost[u];
for (const auto& v : g[u]) {
dfs(v);
dp[u] += dp[v];
}
dp[u] = max(dp[u], 0ll);
# | 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... |