# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
531594 | colazcy | Torrent (COI16_torrent) | C++17 | 666 ms | 27752 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 <cassert>
#include <vector>
#include <functional>
#define let const auto
#define rep(name,beg,end) for(auto lim_##name = end,name = beg;name <= lim_##name;name++)
#define per(name,beg,end) for(auto lim_##name = end,name = beg;name >= lim_##name;name--)
#define repn(lim) for(auto REPN_lIM = lim,REPN = 1;REPN <= REPN_lIM;REPN++)
#define debug(...) fprintf(stderr,__VA_ARGS__)
#define trace() debug("line : %d, Function : %s\n",__LINE__,__FUNCTION__)
constexpr int maxn = 3e5 + 10;
std::vector<int> G[maxn],seq;
void addedge(const int u,const int v){G[u].push_back(v);}
int n,s,t;
bool dfs(const int u,const int faz = -1){
seq.push_back(u);
if(u == t)return true;
for(let v : G[u]){
if(v == faz)continue;
if(dfs(v,u))return true;
}
seq.pop_back();
return false;
}
std::pair<int,int> solve(const int lim){
// assert(seq.size() >= 2);
// assert(lim >= 0);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |