# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1062575 | alexdd | September (APIO24_september) | C++17 | 133 ms | 24784 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 "september.h"
#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
vector<int> con[100005];
int mint[100005],maxt[100005];
int submin[100005],submax[100005];
int mars[100005];
void same_day(int le, int ri)
{
if(le>=ri)
return;
//cout<<le<<" "<<ri<<" same day\n";
mars[le+1]++;
mars[ri+1]--;
}
void dfs(int nod)
{
submin[nod]=mint[nod];
submax[nod]=maxt[nod];
for(auto adj:con[nod])
{
dfs(adj);
submin[nod] = min(submin[nod], submin[adj]);
submax[nod] = max(submax[nod], submax[adj]);
}
//cout<<nod<<" "<<mint[nod]<<" "<<submax[nod]<<" zzz\n";
if(nod>0) same_day(mint[nod],submax[nod]);
}
int solve(int N, int M, std::vector<int> F, std::vector<std::vector<int>> S)
# | 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... |
# | 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... |