Submission #837517

#TimeUsernameProblemLanguageResultExecution timeMemory
837517tengiz05Thousands Islands (IOI22_islands)C++17
10 / 100
36 ms48340 KiB
#include "islands.h" #include <bits/stdc++.h> using namespace std; std::variant<bool, vector<int>> find_journey(int n, int m, vector<int> U, vector<int> V) { if (n == 2) { vector<int> e[n]; for (int i = 0; i < m; i++) { e[U[i]].push_back(i); } if (e[0].size() >= 2 && e[1].size() >= 1) { return vector<int>{e[0][0], e[1][0], e[0][1], e[0][0], e[1][0], e[0][1]}; } else { return false; } } vector<int> e[n][n]; for (int i = 0; i < m; i++) { e[U[i]][V[i]].push_back(i); } return vector<int>{e[0][1][0], e[1][2][0], e[2][0][0], e[0][2][0], e[2][1][0], e[1][0][0], e[2][0][0], e[1][2][0], e[0][1][0], e[1][0][0], e[2][1][0], e[0][2][0]}; }
#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...