답안 #1068411

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1068411 2024-08-21T09:45:44 Z jamjanek Choreography (IOI23_choreography) C++17
10 / 100
57 ms 9540 KB
#include "choreography.h"
#include <bits/stdc++.h>
using namespace std;

vector<int> pos[2];
vector<int> perm;
vector<int>pom;
int shift;
int n,i;
void init(int N, std::vector<int> P) {
    n=N;
    pos[0].resize(n);
    pos[1].resize(n);
    pom.resize(n);
    for(int i=0;i<N;i++)pos[0][P[i]] = i;
    perm = P;

	for(i=0;i<n;i++)
		pom[perm[perm[i]]] = perm[i];
	perm = pom;
	for(i=0;i<n;i++)
		pos[1][perm[i]]=i;
	i=0;
    return;
} 

void move_right(int k) {
    return;
}

void move_left(int k) {
    return;
}

void swap_places() {
    return;
}

void move_around() {
	i^=1;
    return;
}

int get_position(int D){
	return pos[i][D];
//    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 57 ms 7132 KB 3rd lines differ - on the 1st token, expected: '63867', found: '52402'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB 5th lines differ - on the 1st token, expected: '411', found: '310'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 50 ms 7148 KB Output is correct
2 Correct 50 ms 9536 KB Output is correct
3 Correct 51 ms 9540 KB Output is correct
4 Correct 34 ms 6868 KB Output is correct
5 Correct 38 ms 6828 KB Output is correct
6 Correct 30 ms 6864 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 50 ms 7148 KB Output is correct
2 Correct 50 ms 9536 KB Output is correct
3 Correct 51 ms 9540 KB Output is correct
4 Correct 34 ms 6868 KB Output is correct
5 Correct 38 ms 6828 KB Output is correct
6 Correct 30 ms 6864 KB Output is correct
7 Incorrect 50 ms 9292 KB 3rd lines differ - on the 1st token, expected: '74726', found: '64493'
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 57 ms 7132 KB 3rd lines differ - on the 1st token, expected: '63867', found: '52402'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 57 ms 7132 KB 3rd lines differ - on the 1st token, expected: '63867', found: '52402'
2 Halted 0 ms 0 KB -