Submission #824251

#TimeUsernameProblemLanguageResultExecution timeMemory
824251LiudasThousands Islands (IOI22_islands)C++17
5 / 100
35 ms5676 KiB
#include "islands.h" #include <cassert> #include <cstdio> #include <variant> #include <vector> #include <algorithm> using namespace std; variant<bool, vector<int>> find_journey(int N, int M, std::vector<int> U, std::vector<int> V) { if (N == 2){ if(count(U.begin(), U.end(), 0) >= 2 && count(U.begin(), U.end(), 1) >= 1){ vector<pair<int, int>> ans(M); for(int i = 0; i < M; i ++){ ans[i] = {U[i], i}; } sort(ans.begin(), ans.end()); vector<int> ret = {ans[0].second, ans.back().second, ans[1].second, ans[0].second, ans.back().second, ans[1].second}; return ret; } return false; } 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...