이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*#pragma GCC optimize("O3")*/
#include<bits/stdc++.h>
#include "messy.h"
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//#define ordered_set tree<int, null_type,less<int >, rb_tree_tag,tree_order_statistics_node_update>
#define eps 1e-9
#define MOD1 998244353
#define MOD2 1000000007
#define INV_10 299473306
#define INF 1000000000
#define PI 3.14159265358979323846
using namespace std;
vector<int> restore_permutation(int n, int w, int r) {
string s="";
string cu;
for(int i = 0; i < n; i++)
s+='0';
cu=s;
for(int i = 0; i < n; i++)
{
s[i]='1';
add_element(s);
}
compile_set();
vector<int>ans(n);
bool vu[n];
for(int i = 0; i < n; i++)
vu[i]=0;
for(int i = 0; i < n; i++)
{
bool done=0;
for(int j = 0; j < n && !done; j++)
{
if(!vu[j])
{
cu[j]='1';
if(check_element(cu))
{
vu[j]=1;
done=1;
ans[j]=i;
}
else
cu[j]='0';
}
}
}
return ans;
}
/*int main()
{
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
string s;
cin >> s;
int k;
cin >> k;
//vector<int>v;
int v[k];
for(int i = 0; i < k; i++)
{
int x;
cin >> x;
//v.push_back(x);
v[i]=x;
}
cout << solve_puzzle(s, k, v) << '\n';
}*/
//size
# | 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... |