#include <vector>
#include "messy.h"
#include <bits/stdc++.h>
#define REP(v, i, j) for (int v = i; v != j; v++)
#define FORI(v) for (auto i : v)
#define FORJ(v) for (auto j : v)
#define OUT(v, a) \
FORI(v) \
cout << i << a;
#define OUTS(v, a, b) \
cout << v.size() << a; \
OUT(v, b)
#define in(a, n) \
REP(i, 0, n) \
cin >> a[i];
#define SORT(v) sort(begin(v), end(v))
#define REV(v) reverse(begin(v), end(v))
#define MEMSET(m) memset(m, -1, sizeof m)
#define pb push_back
#define fi first
#define se second
#define detachIO \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
using namespace std;
typedef pair<int, int> pii;
typedef pair<pii, int> piii;
typedef pair<pii, pii> piiii;
std::vector<int> restore_permutation(int n, int w, int r) {
REP(i,0,n){
string s;
REP(_,0,i+1)s.pb('1');
REP(_,0,n-i-1)s.pb('0');
add_element(s);
}
compile_set();
string prev;
REP(i,0,n)prev.pb('0');
vector<int> ans;
ans.resize(n);
REP(i,0,n){
REP(j,0,n){
if(prev[j]=='1')continue;
prev[j]='1';
if(check_element(prev)){ans[j]=i;break;}
prev[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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |