Submission #637285

# Submission time Handle Problem Language Result Execution time Memory
637285 2022-09-01T09:27:43 Z ggoh Unscrambling a Messy Bug (IOI16_messy) C++14
0 / 100
1 ms 300 KB
#include "messy.h"
#include<bits/stdc++.h>
using namespace std;
#define sz(v) ((int)(v).size())
typedef long long lint;
bool C;
vector<int> restore_permutation(int n, int w, int r) {
    vector<int>ans;
    for(int i=0;i<n;i++)
    {
        ans.push_back(i);
    }
    
    if(w==256)
    {
        string a[3];
        a[0]="11110000";
        a[1]="11001100";
        a[2]="10101010";
        for(int i=0;i<3;i++)add_element(a[i]);
        compile_set();
        int ch=0;
        for(int i=0;i<3;i++)
        {
            for(int j=0;j<8;j++)
            {
                for(int k=j+1;k<8;k++)
                {
                    if(a[i][j]==a[i][k])continue;
                    swap(a[i][j],a[i][k]);
                    C=check_element(a[i]);
                    if(C)
                    {
                        ch=1;
                        swap(ans[j],ans[k]);
                    }
                    swap(a[i][j],a[i][k]);
                }
                if(ch)break;
            }
            if(ch)break;
        }
    }
    else if(w==320)
    {

    }
    else if(w==1024)
    {

    }
    else if(w==1792)
    {

    }
    else // w==896
    {

    }

    return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB n = 8
2 Incorrect 0 ms 212 KB grader returned WA
3 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 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 1 ms 300 KB grader returned WA
2 Halted 0 ms 0 KB -