Submission #839547

# Submission time Handle Problem Language Result Execution time Memory
839547 2023-08-30T08:58:52 Z model_code Choreography (IOI23_choreography) C++17
7 / 100
83 ms 5856 KB
// correct/solution-subtask1.cpp

#include "choreography.h"
#include <vector>

int n, s = 0;
std::vector<int> p;

void init(int N, std::vector<int> P){
    n = N;
    p.resize(N);
    for(int i = 0; i < N; i++){
        p[P[i]] = i;
    }
} 

void move_right(int K){
    s = (s + K + n) % n;
}

void move_left(int K){
    move_right(-K);
}

void swap_places() {}

void move_around() {}

int get_position(int D){
    return (p[D] + s) % n;
}
# Verdict Execution time Memory Grader output
1 Correct 71 ms 5820 KB Output is correct
2 Correct 83 ms 5824 KB Output is correct
3 Correct 66 ms 5852 KB Output is correct
4 Correct 63 ms 5856 KB Output is correct
5 Correct 53 ms 4028 KB Output is correct
6 Correct 44 ms 4040 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB 5th lines differ - on the 1st token, expected: '411', found: '410'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 60 ms 5828 KB 16th lines differ - on the 1st token, expected: '54117', found: '49341'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 60 ms 5828 KB 16th lines differ - on the 1st token, expected: '54117', found: '49341'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 71 ms 5820 KB Output is correct
2 Correct 83 ms 5824 KB Output is correct
3 Correct 66 ms 5852 KB Output is correct
4 Correct 63 ms 5856 KB Output is correct
5 Correct 53 ms 4028 KB Output is correct
6 Correct 44 ms 4040 KB Output is correct
7 Incorrect 60 ms 5828 KB 16th lines differ - on the 1st token, expected: '54117', found: '49341'
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 71 ms 5820 KB Output is correct
2 Correct 83 ms 5824 KB Output is correct
3 Correct 66 ms 5852 KB Output is correct
4 Correct 63 ms 5856 KB Output is correct
5 Correct 53 ms 4028 KB Output is correct
6 Correct 44 ms 4040 KB Output is correct
7 Incorrect 1 ms 212 KB 5th lines differ - on the 1st token, expected: '411', found: '410'
8 Halted 0 ms 0 KB -