# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
203152 | alexandra_udristoiu | Tropical Garden (IOI11_garden) | C++14 | 5016 ms | 25976 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<fstream>
#include<vector>
#include<cstring>
#include "garden.h"
#include "gardenlib.h"
#define DIM 300005
using namespace std;
static int viz[DIM], dist[DIM], t[DIM], cic[DIM], nrcic[DIM], pos[DIM];
static pair<int, int> p[DIM][2];
static vector<int> v[DIM];
static void dfs(int nod){
viz[nod] = 1;
for(int i = 0; i < v[nod].size(); i++){
int vecin = v[nod][i];
if(viz[vecin] == 0){
dist[vecin] = 1 + dist[nod];
dfs(vecin);
}
}
}
static void calcp(int i, int x, int y){
if(p[x][0].first == 0){
p[x][0] = make_pair(i, y);
}
else{
if(p[x][1].first == 0){
p[x][1] = make_pair(i, y);
}
}
}
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... |