# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1068141 | jerzyk | Truck Driver (IOI23_deliveries) | C++17 | 5586 ms | 27524 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>
#include "deliveries.h"
using namespace std;
#define pb push_back
#define st first
#define nd second
typedef long long ll;
typedef long double ld;
const ll I = 1000LL * 1000LL * 1000LL * 1000LL * 1000LL * 1000LL;
const int II = 2 * 1000 * 1000 * 1000;
const ll M = 1000LL * 1000LL * 1000LL + 7LL;
const int N = 100 * 1000 + 7;
int n;
ll tab[N], sum[N];
ll al = 0LL, answer;
vector<pair<int, ll>> ed[N];
bool vis[N];
void DFS(int v, ll ev)
{
vis[v] = true;
sum[v] = tab[v];
for(int i = 0; i < (int)ed[v].size(); ++i)
{
if(vis[ed[v][i].st]) continue;
DFS(ed[v][i].st, ed[v][i].nd);
sum[v] += sum[ed[v][i].st];
}
//cerr << answer << " dfs: " << v - 1 << " " << sum[v] << " " << al << " " << ev << "\n";
# | 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... |