제출 #278703

#제출 시각아이디문제언어결과실행 시간메모리
278703ElyesChaabouniUnscrambling a Messy Bug (IOI16_messy)C++14
38 / 100
2 ms384 KiB
/*#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 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...