Submission #558049

# Submission time Handle Problem Language Result Execution time Memory
558049 2022-05-06T15:10:34 Z InternetPerson10 The Collection Game (BOI21_swaps) C++17
12 / 100
511 ms 536 KB
#include "swaps.h"
#include <bits/stdc++.h>

using namespace std;

void solve(int N, int V) {
    srand(time(NULL));
    vector<int> x(N);
    for(int i = 0; i < N; i++) x[i] = i + 1;
    vector<int> shuff(N);
    for(int i = 0; i < N; i++) {
        shuff[i] = i+1;
    }
    while(V--) {
        for(int i = 0; i < N; i++) {
            int g = rand() % N;
            swap(shuff[i], shuff[g]);
        }
        for(int i = 0; i < N-1; i += 2) {
            schedule(min(shuff[i], shuff[i+1]), max(shuff[i], shuff[i+1]));
        }
        visit();
    }
    answer(x);
}
# Verdict Execution time Memory Grader output
1 Incorrect 49 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 49 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 57 ms 208 KB Correct
2 Correct 106 ms 208 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 57 ms 208 KB Correct
2 Correct 106 ms 208 KB Correct
3 Incorrect 51 ms 208 KB Not correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 48 ms 208 KB Correct
2 Correct 98 ms 208 KB Correct
3 Correct 243 ms 208 KB Correct
4 Correct 444 ms 380 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 208 KB Correct
2 Correct 98 ms 208 KB Correct
3 Correct 243 ms 208 KB Correct
4 Correct 444 ms 380 KB Correct
5 Incorrect 49 ms 208 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 48 ms 208 KB Correct
2 Correct 112 ms 208 KB Correct
3 Correct 226 ms 208 KB Correct
4 Correct 433 ms 536 KB Correct
5 Incorrect 46 ms 292 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 48 ms 208 KB Correct
2 Correct 112 ms 208 KB Correct
3 Correct 226 ms 208 KB Correct
4 Correct 433 ms 536 KB Correct
5 Incorrect 46 ms 292 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 35 ms 208 KB Correct
2 Correct 100 ms 208 KB Correct
3 Correct 239 ms 208 KB Correct
4 Correct 511 ms 376 KB Correct
5 Incorrect 48 ms 304 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 35 ms 208 KB Correct
2 Correct 100 ms 208 KB Correct
3 Correct 239 ms 208 KB Correct
4 Correct 511 ms 376 KB Correct
5 Incorrect 48 ms 304 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 48 ms 208 KB Correct
2 Correct 121 ms 208 KB Correct
3 Correct 228 ms 208 KB Correct
4 Incorrect 446 ms 532 KB Not correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 48 ms 208 KB Correct
2 Correct 121 ms 208 KB Correct
3 Correct 228 ms 208 KB Correct
4 Incorrect 446 ms 532 KB Not correct
5 Halted 0 ms 0 KB -