#include "bits/stdc++.h"
#include "longesttrip.h"
using namespace std;
vector<int> longest_trip(int n, int D) {
vector<int> v = {0};
vector<bool> vis(n);
while ((int)v.size() <= (n >> 1)) {
for (int i = 1; i < n; i++) {
if (!vis[i] && are_connected({v.back()}, {i})) {
v.push_back(i);
vis[i] = true;
break;
}
}
assert(false);
}
return v;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |