Submission #1182327

#TimeUsernameProblemLanguageResultExecution timeMemory
1182327PagodePaivaThousands Islands (IOI22_islands)C++20
6.75 / 100
21 ms7492 KiB
#include "islands.h" #include<bits/stdc++.h> #include <variant> #include <vector> using namespace std; const int N = 100010; vector <pair <int, int>> g[N]; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { for(int i = 0;i < M;i++){ g[U[i]].push_back({V[i], i}); } if(g[0].size() < 2) return false; if(g[1].size() < 1) return false; int a = g[0][0].second, b = g[0][1].second, c = g[1][0].second; vector <int> ans = {a, c, b, a, c, b}; return ans; /* if (N == 4) { return std::vector<int>({0, 1, 2, 4, 0, 3, 2, 1, 4, 3}); } return false; */ }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...