제출 #1224621

#제출 시각아이디문제언어결과실행 시간메모리
1224621maya_sUnscrambling a Messy Bug (IOI16_messy)C++20
38 / 100
0 ms328 KiB
#include <bits/stdc++.h>
#include "messy.h"
using namespace std;
typedef int ll;

vector<int> restore_permutation(int n, int w, int r) {
    string s = "";
    for(ll i = 0; i < n; i++) s.push_back('0');
    for(ll i = 0; i < n; i++){
        s[i] = '1';
        add_element(s);
    }

    compile_set();
    for(ll i = 0; i < n; i++) s[i] = '0';

    vector<ll> p(n);

    for(ll i = 0; i < n; i++){
        for(ll j = 0; j < n; j++) if(s[j] != '1') {
            s[j] = '1';
            if(check_element(s)) {
                // cout << s << "\n";
                p[j] = i; break;
            }
            s[j] = '0';
        }
    }

    return p;
}

컴파일 시 표준 에러 (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...