제출 #945312

#제출 시각아이디문제언어결과실행 시간메모리
945312Nika533Unscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
1 ms600 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(); vector<int> p(n,0); s=""; for (int i=0; i<n; i++) s.pb('0'); for (int i=0; i<n; i++) { string s2=s; for (int j=0; j<n; j++) { if (s2[j]=='0') { s2[j]='1'; if (check_element(s2)) { p[j]=i; s[j]='1'; break; } s2[j]='0'; } } } 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...