Submission #1059563

#TimeUsernameProblemLanguageResultExecution timeMemory
1059563shiomusubi496Thousands Islands (IOI22_islands)C++17
6.75 / 100
21 ms6488 KiB
#include "islands.h" #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep2(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; --i) #define rrep2(i, a, b) for (int i = (int)(b) - 1; i >= (int)(a); --i) #define all(v) begin(v), end(v) #define rall(v) rbegin(v), rend(v) using namespace std; using ll = long long; template<class T, class U> bool chmin(T& a, const U& b) { return a > b ? a = b, true : false; } template<class T, class U> bool chmax(T& a, const U& b) { return a < b ? a = b, true : false; } struct edge { int to, idx; }; using Graph = vector<vector<edge>>; std::variant<bool, std::vector<int>> find_journey(int N, int M, std::vector<int> U, std::vector<int> V) { Graph G(N); rep (i, M) { G[U[i]].push_back({V[i], i}); } if (G[0].size() >= 2 && G[1].size() >= 1) { return vector<int>{G[0][0].idx, G[1][0].idx, G[0][1].idx, G[0][0].idx, G[1][0].idx, G[0][1].idx}; } else { 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...