# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
839872 | jtnydv25 | Longest Trip (IOI23_longesttrip) | C++17 | 25 ms | 416 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "longesttrip.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(c) ((c).begin()), ((c).end())
#define sz(x) ((int)(x).size())
#ifdef LOCAL
#include <print.h>
#else
#define trace(...)
#define endl "\n" // remove in interactive
#endif
vector<vector<int>> remove(vector<vector<int>> P, int a, int b){
vector<vector<int>> ret;
for(int i = 0; i < sz(P); i++) if(i != a && i != b) ret.push_back(P[i]);
return ret;
}
vector<int> longest_trip(int n, int d){
vector<vector<int>> paths;
vector<int> nodes(n), b(n - 1);
iota(all(nodes), 0);
random_shuffle(all(nodes));
for(int i = 0; i < n - 1; i++){
b[i] = are_connected({nodes[i]}, {nodes[i + 1]});
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |