이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <variant>
#include <vector>
using namespace std;
std::variant<bool, std::vector<int>> find_journey(int N, int M, std::vector<int> v1, std::vector<int> v2)
{
    int n=N,m=M;
    map<pair<int,int>,vector<int>> cnt;
    for(int j=0;j<m;j++)
        cnt[{v1[j],v2[j]}].push_back(j);
    if(n>2)
    {
        int edge01=cnt[{0,1}][0];
        int edge10=cnt[{1,0}][0];
        int edge02=cnt[{0,2}][0];
        int edge20=cnt[{2,0}][0];
        int edge12=cnt[{1,2}][0];
        int edge21=cnt[{2,1}][0];
        return vector<int>({edge01,edge12,edge20,edge02,edge21,edge10,edge20,edge12,edge01,edge10,edge21,edge02});
    }
    else if(cnt[{0,1}].size()>=2 and cnt[{1,0}].size()>=1)
    {
        int f=cnt[{0,1}][0];
        int s=cnt[{0,1}][1];
        int th=cnt[{1,0}][0];
        return vector<int>({f,th,s,f,th,s});
    }
    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... |