Submission #830425

#TimeUsernameProblemLanguageResultExecution timeMemory
830425caganyanmazThousands Islands (IOI22_islands)C++17
5 / 100
21 ms5116 KiB
#include <bits/stdc++.h> #include "islands.h" using namespace std; #ifdef DEBUGGING #include "../debug.h" #else #define debug(x...) void(42) #endif int n, m; vector<int> u, v; variant<bool, vector<int>> subtask1() { if (n <= 2) return false; array<array<int, 3>, 3> a; for (int i = 0; i < m; i++) if (u[i] <= 2 && v[i] <= 2) a[u[i]][v[i]] = i; debug(a); return vector<int>({a[0][1], a[1][2], a[2][0], a[0][2], a[2][1], a[1][0], a[2][0], a[1][2], a[0][1], a[1][0], a[2][1], a[0][2]}); } variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) { n = N; m = M; u = U; v = V; if (n * (n-1) == m) return subtask1(); assert(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...