Submission #283753

#TimeUsernameProblemLanguageResultExecution timeMemory
2837532qbingxuanSimurgh (IOI17_simurgh)C++14
0 / 100
0 ms256 KiB
#include "simurgh.h" #include <bits/stdc++.h> #ifdef local #define debug(...) QQBX(#__VA_ARGS__, __VA_ARGS__) void QQBX(const char *s) {} template <typename H, typename ...T> void QQBX(const char *s, const H&h, T &&...args) { for(; *s && *s != ','; ++s) if(*s != ' ') std::cerr << *s; std::cerr << " = " << h << (sizeof...(T) ? ", " : "\n"); if(sizeof...(T)) QQBX(++s, args...); } #define safe std::cerr<<__PRETTY_FUNCTION<<" line "<<__LINE__<<" safe\n"; #else #define debug(...) ((void)0) #define safe ((void)0) #endif // local #define pb emplace_back using namespace std; std::vector<int> find_roads(int n, std::vector<int> u, std::vector<int> v) { int m = u.size(); vector<int> r(m); iota(r.begin(), r.end(), 0); do { vector<int> q; for(int i = 0; i < n-1; i++) q.pb(r[i]); if(count_common_roads(q) == n-1) return q; } while(next_permutation(r.begin(), r.end())); }

Compilation message (stderr)

simurgh.cpp: In function 'std::vector<int> find_roads(int, std::vector<int>, std::vector<int>)':
simurgh.cpp:23:20: warning: control reaches end of non-void function [-Wreturn-type]
   23 |     vector<int> r(m);
      |                    ^
#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...