# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1059650 | 2024-08-15T06:44:12 Z | tolbi | Longest Trip (IOI23_longesttrip) | C++17 | 0 ms | 344 KB |
#include "longesttrip.h" //bool are_connected(std::vector<int> A, std::vector<int> B); bool sor(int x, int y){ std::vector<int> ilk; std::vector<int> iki; ilk.push_back(x); iki.push_back(y); return are_connected(ilk,iki); } std::vector<int> longest_trip(int N, int D) { std::vector<int> ans; ans.push_back(0); std::vector<bool> vis(N,false); vis[0]=true; while (ans.size()<N){ for (int i = 0; i < N; i++){ if (sor(ans.back(),i)){ ans.push_back(i); vis[i]=true; break; } } } return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | non-disjoint arrays |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | non-disjoint arrays |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | non-disjoint arrays |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | non-disjoint arrays |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | non-disjoint arrays |
2 | Halted | 0 ms | 0 KB | - |