제출 #1295720

#제출 시각아이디문제언어결과실행 시간메모리
1295720ulvixUnscrambling a Messy Bug (IOI16_messy)C++20
20 / 100
1 ms348 KiB
#include <bits/stdc++.h>
#include "messy.h"
#ifdef ULVI
    #define db(x)          cerr<<"[ "<<#x<<" = "<<(x)<<" ]\n"
    #define dbv(v)         cerr<<#v<<" = [ ";for(auto &__x : v)cerr<<__x<<' ';cerr<<"]\n"
    #define line()         cerr<<string(80, '-')<<'\n'
#else
    #define db(x)
    #define dbv(v)
    #define line()
#endif
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define ff first
#define ss second
#define enld endl
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<ll,ll> pll;
const ll sz=2e5+100;
const ll mod=1e9+7;
const ll inf=1e18;
template<class T>
using indexed_set=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
void add(string s){
    add_element(s);
}
bool check(string s){
    return check_element(s);
}
vector<int> restore_permutation(int n, int w, int r){
    string s(n,'0');
    for(ll i=0;i<n;i++){
        s[i]='1';
        add(s);
    }
    compile_set();
    s=string(n,'0');
    vector<int> ans;
    for(ll i=0;i<n;i++){
        for(ll j=0;j<n;j++){
            if(s[j]=='1') continue;
            s[j]='1';
            if(check(s)){
                ans.push_back(j);
                break;
            }
            s[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...