제출 #1121915

#제출 시각아이디문제언어결과실행 시간메모리
1121915ElayV13Unscrambling a Messy Bug (IOI16_messy)C++17
0 / 100
2 ms504 KiB
#include "messy.h" #include <bits/stdc++.h> using namespace std; std::vector<int> restore_permutation(int n, int w, int r) { vector < int > ans(n); vector < string > s; for(int i = 0;i < n - 1;i++) { string q = ""; for(int j = 0;j <= i;j++) q = q + '0'; for(int j = i + 1;j < n;j++) q = q + '1'; add_element(q); s.push_back(q); } compile_set(); for(int i = 0;i < n;i++) { for(int j = i;j < n;j++) { bool f = 1; for(int ii = 0;ii < n;ii++) { string q = s[ii]; swap(q[i] , q[j]); f &= check_element(q); } if(f) { for(int ii = 0;ii < n;ii++) { ans[ii] = ii; } swap(ans[i], ans[j]); return ans; } } } }

컴파일 시 표준 에러 (stderr) 메시지

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