제출 #667070

#제출 시각아이디문제언어결과실행 시간메모리
667070Stavab수천개의 섬 (IOI22_islands)C++17
5 / 100
32 ms3404 KiB
#include "islands.h" #include <variant> #include <vector> std::variant<bool, std::vector<int>> find_journey(int N, int M, std::vector<int> U, std::vector<int> V) { if(N == 2) { std::vector<int> v = {}; int c1 = -1, c2 = -1, c3 = -1; for(int i = 0; i < (int)U.size(); i++) { if(U[i] == 0 && c1 == -1) c1 = i; else if(U[i] == 0) c2 = i; else c3 = i; } if(c1 == -1 || c2 == -1 || c3 == -1) return false; else { v.push_back(c1); v.push_back(c3); v.push_back(c2); v.push_back(c1); v.push_back(c3); v.push_back(c2); } std::variant<bool, std::vector<int>> var; var = v; return var; } 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...