Submission #796665

# Submission time Handle Problem Language Result Execution time Memory
796665 2023-07-28T15:29:49 Z Malix Unscrambling a Messy Bug (IOI16_messy) C++14
0 / 100
1 ms 340 KB
#include <vector>
#include <bits/stdc++.h>
using namespace std;
#include "messy.h"

std::vector<int> restore_permutation(int n, int w, int r) {
    string a(n, '0');
    for(int i=0;i<n-1;i++){a[i]='1';add_element(a);}
    compile_set();
    vector<int> ans(n, n-1);
    bool is_true=0;
    string b(n, '0');int c=0;
    for(int i=0;i<n-1;i++){
        is_true=0;c=0;
        while(!is_true){
            if(b[c]!='1'){
                b[c]='1';
                is_true=check_element(b);
                if(!is_true)b[c]='0';
            }  
            c++;
            if(c>=n)is_true=1;
        }
        ans[i]=c;
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB grader returned WA
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB grader returned WA
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB grader returned WA
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB grader returned WA
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB grader returned WA
2 Halted 0 ms 0 KB -