# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
129034 | thanos | Min-max tree (BOI18_minmaxtree) | C++14 | 3 ms | 1016 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<map>
#include<vector>
#include<algorithm>
#define pb push_back
using namespace std;
struct edge{
int x;
int y;
int z;
bool operator<(const edge &rhs)const{return rhs.z<z;};
}q[10005];
struct par{
int x;
int y;
bool operator<(const par &rhs)const{return rhs.x>x;};
};
map<par,int> mym;
vector<int> adj[10005];
bool dfs(int s,int d,int v,bool vis[]){
vis[s]=true;
if(s==d){
return true;
}
bool c=false;
for(int i=0; i<adj[s].size(); i++){
if(!vis[adj[s].at(i)]){
if(dfs(adj[s].at(i),d,v,vis)){
par t; t.x=min(s,adj[s].at(i)); t.y=max(s,adj[s].at(i));
mym[t]=v;
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... |