# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1008689 | 2024-06-26T16:42:51 Z | Abito | Longest Trip (IOI23_longesttrip) | C++17 | 1 ms | 344 KB |
#include "longesttrip.h" #include <bits/stdc++.h> #define pb push_back using namespace std; std::vector<int> longest_trip(int n, int D) { vector<int> v; vector<bool> vis(n); v.pb(0); while (v.size()<n){ for (int i=0;i<n;i++){ if (vis[i]) continue; vector<int> x,y;x.pb(v.back());y.pb(i); if (!are_connected(x,y)) continue; v.pb(i); break; } } return v; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 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 | 1 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 | - |