10019 | 2024-03-24 13:09:19 | 111 | Széfnyitás | cpp17 | Wrong answer 0/100 | 143ms | 5052 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin>>N;
int a[N+1],g[N+1][2];
for(int i=1;i<=N;i++){
cin>>a[i]>>g[i][0]>>g[i][1];
}
int K;
cin>>K;
for(int t=0;t<1000;t++){
vector<int>b(N);
for(int i=0;i<N;i++){
b[i]=rand()&1;
}
set<vector<int>>s;
vector<int>v(N);
for(int z=1;z<=N;z++){
int x=z;
for(int i=0;i<N;i++){
v[i]=a[x];
x=g[x][b[i]];
}
s.insert(v);
}
if(s.size()==N){
return 0;
}
}
return 1;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1832 KiB | ||||
2 | Wrong answer | 3ms | 2020 KiB | ||||
subtask2 | 0/16 | ||||||
3 | Runtime error | 3ms | 2244 KiB | ||||
4 | Runtime error | 3ms | 2332 KiB | ||||
5 | Wrong answer | 3ms | 2368 KiB | ||||
6 | Wrong answer | 3ms | 2584 KiB | ||||
7 | Wrong answer | 3ms | 2696 KiB | ||||
8 | Wrong answer | 3ms | 2864 KiB | ||||
9 | Wrong answer | 2ms | 2880 KiB | ||||
10 | Wrong answer | 2ms | 2884 KiB | ||||
11 | Wrong answer | 3ms | 3020 KiB | ||||
12 | Wrong answer | 2ms | 2972 KiB | ||||
13 | Wrong answer | 3ms | 3104 KiB | ||||
subtask3 | 0/24 | ||||||
14 | Runtime error | 8ms | 3192 KiB | ||||
15 | Runtime error | 10ms | 3296 KiB | ||||
16 | Runtime error | 9ms | 3300 KiB | ||||
17 | Runtime error | 8ms | 3212 KiB | ||||
18 | Runtime error | 10ms | 3336 KiB | ||||
19 | Runtime error | 10ms | 3488 KiB | ||||
20 | Runtime error | 9ms | 3588 KiB | ||||
21 | Runtime error | 10ms | 3708 KiB | ||||
subtask4 | 0/23 | ||||||
22 | Runtime error | 8ms | 3920 KiB | ||||
23 | Runtime error | 9ms | 4020 KiB | ||||
24 | Runtime error | 12ms | 4024 KiB | ||||
25 | Runtime error | 10ms | 4028 KiB | ||||
26 | Runtime error | 12ms | 4260 KiB | ||||
27 | Runtime error | 12ms | 4348 KiB | ||||
28 | Runtime error | 12ms | 4264 KiB | ||||
29 | Runtime error | 10ms | 4248 KiB | ||||
subtask5 | 0/37 | ||||||
30 | Runtime error | 3ms | 2244 KiB | ||||
31 | Runtime error | 3ms | 2332 KiB | ||||
32 | Wrong answer | 3ms | 2368 KiB | ||||
33 | Wrong answer | 3ms | 2584 KiB | ||||
34 | Wrong answer | 3ms | 2696 KiB | ||||
35 | Wrong answer | 3ms | 2864 KiB | ||||
36 | Wrong answer | 2ms | 2880 KiB | ||||
37 | Wrong answer | 2ms | 2884 KiB | ||||
38 | Wrong answer | 3ms | 3020 KiB | ||||
39 | Wrong answer | 2ms | 2972 KiB | ||||
40 | Wrong answer | 3ms | 3104 KiB | ||||
41 | Runtime error | 8ms | 3192 KiB | ||||
42 | Runtime error | 10ms | 3296 KiB | ||||
43 | Runtime error | 9ms | 3300 KiB | ||||
44 | Runtime error | 8ms | 3212 KiB | ||||
45 | Runtime error | 10ms | 3336 KiB | ||||
46 | Runtime error | 10ms | 3488 KiB | ||||
47 | Runtime error | 9ms | 3588 KiB | ||||
48 | Runtime error | 10ms | 3708 KiB | ||||
49 | Runtime error | 8ms | 3920 KiB | ||||
50 | Runtime error | 9ms | 4020 KiB | ||||
51 | Runtime error | 12ms | 4024 KiB | ||||
52 | Runtime error | 10ms | 4028 KiB | ||||
53 | Runtime error | 12ms | 4260 KiB | ||||
54 | Runtime error | 12ms | 4348 KiB | ||||
55 | Runtime error | 12ms | 4264 KiB | ||||
56 | Runtime error | 10ms | 4248 KiB | ||||
57 | Runtime error | 98ms | 4268 KiB | ||||
58 | Runtime error | 141ms | 4340 KiB | ||||
59 | Runtime error | 141ms | 4348 KiB | ||||
60 | Runtime error | 142ms | 4620 KiB | ||||
61 | Runtime error | 143ms | 4732 KiB | ||||
62 | Runtime error | 143ms | 4956 KiB | ||||
63 | Runtime error | 143ms | 5032 KiB | ||||
64 | Runtime error | 143ms | 5052 KiB | ||||
65 | Runtime error | 143ms | 4952 KiB | ||||
66 | Runtime error | 143ms | 4964 KiB | ||||
67 | Runtime error | 143ms | 4964 KiB | ||||
68 | Runtime error | 143ms | 4960 KiB |