// correct/subtask2.cpp
#include "lockpicking.h"
using namespace std;
int M;
vector<int> a, b;
vector<vector<int>> s, t;
void construct_card(int N, std::vector<int> A, std::vector<std::vector<int>> S) {
a = A, s = S;
M = N*N;
b.resize(N*M);
t.assign(N*M, vector<int>(2));
for (int c=0; c<N; ++c) {
int i = c;
vector<int> last(N);
for (int j=c*M; j<(c+1)*M; ++j) {
b[j] = a[i];
t[j][a[i]] = j+1;
t[j][1-a[i]] = (c+1<N ? j+M+1 : j+1);
last[i] = j;
i = s[i][a[i]];
}
t[c*M+M-1][0] = t[c*M+M-1][1] = last[i];
}
define_states(N*M, b, t, 0);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
failed to open the lock |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
4948 KB |
ok, most errors: 4 (allowed: 29) |
2 |
Correct |
9 ms |
4948 KB |
ok, most errors: 21 (allowed: 29) |
3 |
Correct |
9 ms |
4948 KB |
ok, most errors: 12 (allowed: 29) |
4 |
Correct |
9 ms |
4948 KB |
ok, most errors: 27 (allowed: 29) |
5 |
Correct |
12 ms |
4948 KB |
ok, most errors: 16 (allowed: 29) |
6 |
Correct |
9 ms |
5056 KB |
ok, most errors: 12 (allowed: 29) |
7 |
Correct |
9 ms |
4948 KB |
ok, most errors: 9 (allowed: 29) |
8 |
Correct |
14 ms |
4948 KB |
ok, most errors: 11 (allowed: 29) |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
4948 KB |
ok, most errors: 16 (allowed: 899) |
2 |
Incorrect |
12 ms |
5024 KB |
failed to open the lock |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
failed to open the lock |
2 |
Halted |
0 ms |
0 KB |
- |