100192024-03-24 13:09:19111Széfnyitáscpp17Wrong answer 0/100143ms5052 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1832 KiB
2Wrong answer3ms2020 KiB
subtask20/16
3Runtime error3ms2244 KiB
4Runtime error3ms2332 KiB
5Wrong answer3ms2368 KiB
6Wrong answer3ms2584 KiB
7Wrong answer3ms2696 KiB
8Wrong answer3ms2864 KiB
9Wrong answer2ms2880 KiB
10Wrong answer2ms2884 KiB
11Wrong answer3ms3020 KiB
12Wrong answer2ms2972 KiB
13Wrong answer3ms3104 KiB
subtask30/24
14Runtime error8ms3192 KiB
15Runtime error10ms3296 KiB
16Runtime error9ms3300 KiB
17Runtime error8ms3212 KiB
18Runtime error10ms3336 KiB
19Runtime error10ms3488 KiB
20Runtime error9ms3588 KiB
21Runtime error10ms3708 KiB
subtask40/23
22Runtime error8ms3920 KiB
23Runtime error9ms4020 KiB
24Runtime error12ms4024 KiB
25Runtime error10ms4028 KiB
26Runtime error12ms4260 KiB
27Runtime error12ms4348 KiB
28Runtime error12ms4264 KiB
29Runtime error10ms4248 KiB
subtask50/37
30Runtime error3ms2244 KiB
31Runtime error3ms2332 KiB
32Wrong answer3ms2368 KiB
33Wrong answer3ms2584 KiB
34Wrong answer3ms2696 KiB
35Wrong answer3ms2864 KiB
36Wrong answer2ms2880 KiB
37Wrong answer2ms2884 KiB
38Wrong answer3ms3020 KiB
39Wrong answer2ms2972 KiB
40Wrong answer3ms3104 KiB
41Runtime error8ms3192 KiB
42Runtime error10ms3296 KiB
43Runtime error9ms3300 KiB
44Runtime error8ms3212 KiB
45Runtime error10ms3336 KiB
46Runtime error10ms3488 KiB
47Runtime error9ms3588 KiB
48Runtime error10ms3708 KiB
49Runtime error8ms3920 KiB
50Runtime error9ms4020 KiB
51Runtime error12ms4024 KiB
52Runtime error10ms4028 KiB
53Runtime error12ms4260 KiB
54Runtime error12ms4348 KiB
55Runtime error12ms4264 KiB
56Runtime error10ms4248 KiB
57Runtime error98ms4268 KiB
58Runtime error141ms4340 KiB
59Runtime error141ms4348 KiB
60Runtime error142ms4620 KiB
61Runtime error143ms4732 KiB
62Runtime error143ms4956 KiB
63Runtime error143ms5032 KiB
64Runtime error143ms5052 KiB
65Runtime error143ms4952 KiB
66Runtime error143ms4964 KiB
67Runtime error143ms4964 KiB
68Runtime error143ms4960 KiB