제출 #824251

#제출 시각아이디문제언어결과실행 시간메모리
824251Liudas수천개의 섬 (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...