Submission #847340

# Submission time Handle Problem Language Result Execution time Memory
847340 2023-09-09T13:47:06 Z Ahmed57 The Collection Game (BOI21_swaps) C++17
0 / 100
39 ms 596 KB
#include <bits/stdc++.h>
using namespace std;
#include "swaps.h"
void solve(int n,int v){
    int rnks[n+1];
    for(int i = 1;i<=n;i++)rnks[i] = i;
    bool odd = 0;
    int its = v;
    while(its--){
        int st = odd+1;
        for(;st<n;st+=2){
            schedule(st+1,st);
        }
        vector<int> vis = visit();
        st = odd+1;int ind = 0;
        for(;st<n;st+=2){
            if(vis[ind])swap(rnks[st],rnks[st+1]);
            ind++;
        }
        odd = !odd;
    }vector<int> lol;
    for(int i = 1;i<=n;i++){
        lol.push_back(rnks[i]);
    }
    answer(lol);
}
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 596 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 33 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 33 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 39 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 39 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 30 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 30 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 32 ms 356 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 32 ms 356 KB Not correct
2 Halted 0 ms 0 KB -