# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
292496 | miss_robot | Split the Attractions (IOI19_split) | C++14 | 119 ms | 11312 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 "split.h"
#pragma GCC optimize("O3")
using namespace std;
const int N = 1e5;
int n, A, B, C, ia, ib, ic, d;
int st[N];
vector<int> g[N], sol;
void flood1(int u, int &c, int f){
if(sol[u] || !c) return;
else sol[u] = f, c--;
for(int v : g[u]) flood1(v, c, f);
}
void st1(){
flood1(0, A, ia);
for(int i = 0; i < n; i++){
if(!sol[i]){
flood1(i, B, ib);
break;
}
}
for(int i = 0; i < n; i++) if(!sol[i]) sol[i] = ic;
}
void st2(){
# | 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... |