제출 #943271

#제출 시각아이디문제언어결과실행 시간메모리
943271Nika533Unscrambling a Messy Bug (IOI16_messy)C++14
20 / 100
1 ms348 KiB
#pragma GCC diagnostic warning "-std=c++11" #include "messy.h" #include <bits/stdc++.h> #define pb push_back #define f first #define s second #define MOD 1000000007 #define flush fflush(stdout) #define all(x) (x).begin(),(x).end() #define allr(x) (x).rbegin(), (x).rend() #define pii pair<int,int> using namespace std; vector<int> restore_permutation(int n, int w, int r) { // add_element("0"); // compile_set(); // check_element("0"); string s=""; for (int i=0; i<n; i++) s.pb('0'); for (int i=0; i<n; i++) { s[i]='1'; add_element(s); } compile_set(); string arr[n+1]; for (int i=0; i<(1<<n); i++) { int cnt=0; string ask=""; for (int j=0; j<n; j++) { if (i&(1<<j)) cnt++; if (i&(1<<j)) ask.pb('1'); else ask.pb('0'); } if (check_element(ask)) arr[cnt]=ask; } vector<int> p(n,0); s=""; for (int i=0; i<n; i++) s.pb('0'); for (int i=1; i<=n; i++) { string s2=arr[i]; //cout<<i<<" "<<s2<<" "<<s<<endl; for (int j=0; j<n; j++) { if (s[j]!=s2[j]) { //cout<<"IJ "<<i<<" "<<j<<endl; p[j]=i-1; s[j]='1'; } } } return p; }

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

messy.cpp:1:32: warning: '-std=c++11' is not an option that controls warnings [-Wpragmas]
    1 | #pragma GCC diagnostic warning "-std=c++11"
      |                                ^~~~~~~~~~~~
#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...