제출 #165836

#제출 시각아이디문제언어결과실행 시간메모리
165836SegtreeUnscrambling a Messy Bug (IOI16_messy)C++14
20 / 100
5 ms632 KiB
#include"messy.h" #include<iostream> #include<vector> using namespace std; typedef long long ll; vector<int> restore_permutation(int n,int W,int R){ string s[10]; for(int i=0;i<n-1;i++){ for(int j=0;j<=i;j++)s[i]+='0'; for(int j=i+1;j<n;j++)s[i]+='1'; add_element(s[i]); } compile_set(); for(int i=0;i<n;i++)for(int j=i;j<n;j++){ bool ok=1; for(int k=0;k<n-1;k++){ string t=s[k]; swap(t[i],t[j]); ok&=check_element(t); } if(ok){ vector<int> p(n); for(int k=0;k<n;k++)p[k]=k; swap(p[i],p[j]); return p; } } }

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

messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:28: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...