Submission #66975

#TimeUsernameProblemLanguageResultExecution timeMemory
66975TalantUnscrambling a Messy Bug (IOI16_messy)C++17
0 / 100
2 ms384 KiB
#include "messy.h" //#include "grader.cpp" #include <bits/stdc++.h> #define sc second #define fr first #define mk make_pair #define pb push_back using namespace std; const int N = (1e6 + 5); const int inf = (1e9 + 7); string a; vector <int> v; vector<int> restore_permutation(int n, int w, int r) { for (int i = 0; i < n; i ++) a += '0',v.pb(i); for (int i = n - 1; i >= 0; i --) { a[i] = '1'; add_element(a); } compile_set(); for (int i = 0; i < n; i ++) a[i] = '0'; for (int i = n - 1; i >= 0; i --) { a[i] = '1'; for (int j = 0; j < i; j ++) { string c = a; swap(c[j],c[i]); if (check_element(c)) { swap(v[j],v[i]); return v; } } } }

Compilation message (stderr)

messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:43:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#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...