이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<vii> wgraf;
typedef pair<int,ii> edge;
typedef vector <ll> vl;
typedef pair <ll, ll> LL;
typedef vector <LL> vll;
#define UNVISITED 0
#define VISITED 1
#define pb push_back
#define F first
#define S second
struct nodo{
int v, id;
};
variant <bool, vector <int>> find_journey(int N, int M, vector <int> U, vector <int> V){
vector <int> ans;
if (N==1) return false;
if (N<=400){
vector <nodo> grafo[N+5];
for (int i=0; i<M; i++) {
grafo[U[i]].pb({V[i], i});
}
ans.pb(grafo[0][0].id);
ans.pb(grafo[grafo[0][0].v][0].id);
ans.pb(grafo[0][1].id);
ans.pb(grafo[grafo[0][1].v][0].id);
ans.pb(grafo[grafo[0][0].v][0].id);
ans.pb(grafo[0][0].id);
ans.pb(grafo[grafo[0][1].v][0].id);
ans.pb(grafo[0][1].id);
return ans;
} else return false;
}
# | 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... |