Submission #408975

# Submission time Handle Problem Language Result Execution time Memory
408975 2021-05-20T00:31:30 Z ly20 The Collection Game (BOI21_swaps) C++17
5 / 100
59 ms 200 KB
//
// --- Sample implementation for the task swaps ---
//
// To compile this program with the sample grader, place:
//     swaps.h swaps_sample.cpp sample_grader.cpp
// in a single folder and run:
//     g++ swaps_sample.cpp sample_grader.cpp
// in this folder.
//
#include "swaps.h"
#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) {
    vector <int> temp;
    schedule(a, b);
    temp = visit();
    int id = temp[0];
    temp.clear();
    return id == 1;
}
vector <int> rs;
void solve(int N, int V) {
    // TODO implement this function
    int n = N, v = V;
    rs.clear();
    for(int i = 1; i <= n; i++) {
        rs.push_back(i);
    }
    stable_sort(rs.begin(), rs.end(), cmp);
    answer(rs);
}

Compilation message

swaps.cpp: In function 'void solve(int, int)':
swaps.cpp:24:16: warning: unused variable 'v' [-Wunused-variable]
   24 |     int n = N, v = V;
      |                ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 200 KB Correct
2 Correct 7 ms 200 KB Correct
3 Correct 19 ms 200 KB Correct
4 Correct 37 ms 200 KB Correct
5 Correct 25 ms 200 KB Correct
6 Correct 18 ms 200 KB Correct
7 Correct 52 ms 200 KB Correct
8 Correct 46 ms 200 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 200 KB Correct
2 Correct 6 ms 200 KB Correct
3 Correct 25 ms 200 KB Correct
4 Correct 39 ms 200 KB Correct
5 Correct 31 ms 200 KB Correct
6 Correct 26 ms 200 KB Correct
7 Correct 53 ms 200 KB Correct
8 Correct 59 ms 200 KB Correct
9 Runtime error 10 ms 200 KB Execution killed with signal 13
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Not correct
2 Halted 0 ms 0 KB -