Submission #861604

#TimeUsernameProblemLanguageResultExecution timeMemory
861604faustaadpLongest Trip (IOI23_longesttrip)C++17
0 / 100
0 ms344 KiB
#include "longesttrip.h" #include<bits/stdc++.h> typedef long long ll; using namespace std; #define pb push_back std::vector<int> longest_trip(int N, int D) { vector<int> ret; vector<ll> cal; for(ll i = 0; i < N; i++) ret.pb(i); for(ll i = 0; i < N; i++) for(ll j = i + 1; i < N; j++) { vector<int> A;A.pb(i); vector<int> B;B.pb(j); bool isi = are_connected(A, B); } return ret; // ll mul = 1; // if(N % 2 == 0) // { // vector<int> A;A.pb(0); // vector<int> B;B.pb(1); // bool isi = are_connected(A, B); // if(!isi) // swap(cal[1], cal[2]); // ret.pb(cal[0]); // ret.pb(cal[1]); // } // else // ret.pb(cal[0]); // for(ll i = mul; i + 1 < N; i += 2) // { // ll now = ret.back(); // vector<int> A;A.pb(now); // vector<int> B;A.pb(cal[i]); // bool isi = are_connected(A, B); // if() // } // return ret; }

Compilation message (stderr)

longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:17:18: warning: unused variable 'isi' [-Wunused-variable]
   17 |             bool isi = are_connected(A, B);
      |                  ^~~
#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...