# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
810541 | AndiR | Firefighting (NOI20_firefighting) | C++14 | 451 ms | 33020 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 <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int Nmax=300000;
int n, tot;
ll k;
struct node{
bool cov;
ll dist;
}v[Nmax];
int sol[Nmax];
vector <pair<int, int>> ad[Nmax];
void cmp(bool& t, ll& mx, bool nt, ll nmx){
if (t>nt || t==nt && nmx>mx){
t=nt;
mx=nmx;
}
}
void dfs(int nod, int p){
bool t=1;
ll mx=0;
for (int i=0; i<ad[nod].size(); i++){
if (ad[nod][i].first!=p){
dfs(ad[nod][i].first, nod);
/// nu are cover
if (v[ad[nod][i].first].cov==0){
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |