이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "messy.h"
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2")
#include <bits/stdc++.h>
#define MEM 222
#define sanic ios_base::sync_with_stdio(0)
#define x first
#define y second
#define pf push_front
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz size()
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pi;
const ll INF = 1e17+7;
const ll MOD = 998244353;
ll gcd(ll a, ll b){
if(a%b) return gcd(b, a%b);
return b;
}
ll t,m;
std::vector<int> restore_permutation(int n, int w, int r) {
string s,p;
vector<int> ret(n);
for(int i=0; i<n; i++) s+='0';
for(int i=0; i<n; i++){
s[i] = '1';
//cout << s << ' ';
add_element(s);
}
//cout << '\n';
compile_set();
for(int i=0; i<n; i++) p+='0';
for(int i=0; i<n; i++){
for(int j=0; j<n; j++){
if(p[j]=='1') continue;
p[j] = '1';
if(check_element(p)) {
ret[j] = i;
break;
}
p[j] = '0';
}
//cout << p << ' ';
}
//cout << '\n';
return ret;
}
# | 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... |