제출 #1244051

#제출 시각아이디문제언어결과실행 시간메모리
1244051DedibeatUnscrambling a Messy Bug (IOI16_messy)C++20
38 / 100
0 ms328 KiB
#include "messy.h" #include<bits/stdc++.h> using namespace std; using ll = long long; #define F first #define S second #define all(x) (x).begin(), (x).end() template<typename T, typename U> ostream &operator<<(ostream &os, const pair<T, U> &p) { return os << "(" << p.F << "," << p.S << ")"; } template<typename T> void print(const T &v, int lim = 1e9) { for(auto x : v) if(lim-- > 0) cout << x << " "; cout << endl; } template<typename T> void print(T *begin, const T *end) { for(T *it = begin; it < end; it++) cout << *it << " "; cout << endl; } std::vector<int> restore_permutation(int n, int w, int r) { string s(n, '0'); for(int i = 0; i < n; i++) { s[i] = '1'; add_element(s); } compile_set(); vector<int> ans(n); string t(n, '0'); for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { if(t[j] == '1') continue; t[j] = '1'; if(check_element(t)) { //cout << t << endl; ans[j] = i; break; } t[j] = '0'; } } return ans; }

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

messy.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
messy_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
#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...