Submission #399024

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3990242021-05-05 05:04:43galcaThe Collection Game (BOI21_swaps)C++14
Compilation error
0 ms0 KiB
#include "sort/swaps.h"
//#include <vector>
using namespace std;
void solve(int N, int V) {
vector<int> res(N);
for (int i=0; i<N; i++) {
res[i] = i+1;
}
for (int k = 2; k <= N; k *= 2) {
for (int j = k/2; j > 0; j /= 2) {
for (int i = 0; i < N; i++) {
int ip = i ^ j;
if (ip > i) {
if ((i ^ k) != 0) schedule(ip+1, i+1);
else schedule(i+1, ip+1);
}
}
vector<int> v = visit();
for (int i = 0; i < N/2; i++) {
int ip = i ^ j;
if (ip > i) {
if (v[i]) {
int tmp = res[i];
res[i] = res[ip];
res[ip] = tmp;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

swaps.cpp:1:10: fatal error: sort/swaps.h: No such file or directory
    1 | #include "sort/swaps.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.