제출 #66975

#제출 시각아이디문제언어결과실행 시간메모리
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; } } } }

컴파일 시 표준 에러 (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...