Submission details
Task:Tourist's Journey
Sender:Mauricio_Cruz
Submission time:2026-04-16 13:01:14 +0300
Language:C++ (C++17)
Status:READY
Result:0
Feedback
subtaskverdictscore
#10
#20
#30
#40
#50
#60
Test results
testverdicttimesubtask
#10.01 s1, 2, 5, 6details
#20.01 s1, 2, 3, 4, 5, 6details
#3ACCEPTED0.01 s1, 2, 3, 4, 5, 6details
#40.01 s1, 2, 4, 5, 6details
#50.01 s1, 2, 4, 5, 6details
#60.01 s1, 2, 3, 4, 5, 6details
#70.01 s1, 2, 5, 6details
#80.01 s1, 2, 5, 6details
#90.01 s1, 2, 5, 6details
#100.01 s2, 3, 4, 5, 6details
#110.01 s2, 5, 6details
#120.01 s2, 5, 6details
#130.01 s2, 5, 6details
#14ACCEPTED0.01 s3, 4, 6details
#150.01 s3, 4, 6details
#160.01 s3, 4, 6details
#17ACCEPTED0.01 s3, 4, 6details
#180.01 s3, 4, 6details
#19ACCEPTED0.01 s3, 4, 6details
#200.01 s3, 4, 6details
#210.01 s3, 4, 6details
#22ACCEPTED0.01 s3, 4, 6details
#230.01 s3, 4, 6details
#240.01 s3, 4, 6details
#25ACCEPTED0.01 s3, 4, 6details
#260.01 s3, 4, 6details
#270.01 s3, 4, 6details
#280.12 s4, 6details
#290.12 s4, 6details
#300.12 s4, 6details
#310.12 s4, 6details
#320.12 s4, 6details
#330.12 s4, 6details
#340.12 s4, 6details
#350.12 s4, 6details
#360.12 s4, 6details
#370.12 s4, 6details
#380.12 s4, 6details
#390.12 s4, 6details
#400.12 s4, 6details
#410.12 s4, 6details
#420.12 s4, 6details
#430.12 s4, 6details
#440.12 s4, 6details
#450.12 s4, 6details
#460.12 s4, 6details
#470.12 s4, 6details
#480.08 s4, 6details
#490.09 s4, 6details
#500.08 s4, 6details
#510.01 s5, 6details
#520.01 s5, 6details
#530.01 s5, 6details
#540.01 s5, 6details
#550.01 s5, 6details
#560.01 s5, 6details
#570.12 s6details
#580.12 s6details
#590.12 s6details
#600.09 s6details
#610.09 s6details
#620.08 s6details

Code

#include <bits/stdc++.h>
using namespace std;

#define rz(a,n)a.resize(n); 
#define mset multiset
#define mii map<int,int>
#define str string
#define dbl double
#define i128 __int128
#define to_string tos

#define all(x) x.begin(), x.end()

#define srtl(x)sort(all(x))
#define srtg(x)sort((x).begin(),(x).end(),greater<>())
#define rev(x) reverse(all(x))
#define lb(x,y) lower_bound(x.begin(),x.end(),y)-x.begin()
#define ub(x,y) upper_bound(x.begin(),x.end(),y)-x.begin()

#define ios ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define f first
#define s second
#define pb push_back
#define ins insert
#define next next_permutation(all())
#define _b __builtin_popcount

#define ve vector
#define pii pair<int,int>
#define piii pair<int,pii>
#define vi vector<int>
#define vii vector<pii>
#define viii vector<piii>
#define vvi vector<vi>
#define vst vector<string>
#define vb vector<bool>

#define pV(x)for(auto i:x)cout<<i<<" ";

#define geta(a){for(auto &i:a)cin>>i;}
#define getaa(a){for(int i=1;i<a.size();i++)cin>>a[i];}

#define fri(n)for(int i=0;i<n;i++)
#define frj(j,m)for(int j=0;j<n;j++)
#define ff(v,x,y)for(int v=x;v<y;v++)
#define Fr(n)for(int i=n-1;i>=0;i--)

#define suma(a)accumulate(a.begin(),a.end(),0LL)

#define br(x){cout<<x<<"\n";return;}
#define yesn cout<<"YES\n";

#define yes()br("YES");
#define no(){br("NO")}

#define alice() br("Alice");
#define bob() br("Bob");

#define cn continue;

#define cint const int
#define int long long


int mod=1000000007;
cint mod1=100000007;
cint mod2=998244353;

int ax[8]={0,1,0,-1,-1,1,1,-1};
int ay[8]={1,0,-1,0,1,-1,1,-1};

//bool on(int x,int y){return (x>=0&&x<n&&y>=0&&y<m);}
//int euc(int a,int b,int c,int d){return abs(a-c)+abs(b-d);}

int bp(int x,int y){
	if(y==0)return 1;
	int r=bp(x,y/2);
	return (y&1)?r*r%mod*x%mod:r*r%mod;
}
int bpm(int x,int y){
	if(y==0)return 1;
	int r=bpm(x,y/2);
	return (y&1)?r*r*x:r*r;
}

int cinn(){
	int n;
	cin>>n;
	return n;
}
#define w cinn()

int n,m,k;

vvi adj(200005);



void solve(){
	cin>>n>>m>>k;
	if(n-1==m){
		cout<<1;
		return;
	}
	while(m--){
		int a,b;
		cin>>a>>b;
		adj[a].pb(b);
		adj[b].pb(a);
	}
		
	
	
}

int32_t main(){
	
	ios;

	int t=1;
	//cin>>t;
	
	while(t--){
		solve();
	}
	
	return 0;
}







Test details

Test 1

Subtask: 1, 2, 5, 6

Verdict:

input
4 5 5
1 2
1 3
2 3
2 4
...

correct output
4

user output
(empty)

Feedback: Output is shorter than expected

Test 2

Subtask: 1, 2, 3, 4, 5, 6

Verdict:

input
4 3 4
1 2
2 3
2 4

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 3

Subtask: 1, 2, 3, 4, 5, 6

Verdict: ACCEPTED

input
2 1 1
1 2

correct output
1

user output
1

Test 4

Subtask: 1, 2, 4, 5, 6

Verdict:

input
10 10 5
9 2
9 4
2 5
8 9
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 5

Subtask: 1, 2, 4, 5, 6

Verdict:

input
10 10 9
8 1
8 7
6 9
3 8
...

correct output
1

user output
(empty)

Feedback: Output is shorter than expected

Test 6

Subtask: 1, 2, 3, 4, 5, 6

Verdict:

input
10 9 10
1 10
1 7
3 10
9 5
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 7

Subtask: 1, 2, 5, 6

Verdict:

input
10 15 10
5 8
9 10
2 6
7 8
...

correct output
414

user output
(empty)

Feedback: Output is shorter than expected

Test 8

Subtask: 1, 2, 5, 6

Verdict:

input
10 20 10
7 5
7 8
1 7
10 7
...

correct output
15355

user output
(empty)

Feedback: Output is shorter than expected

Test 9

Subtask: 1, 2, 5, 6

Verdict:

input
10 12 10
8 7
9 8
10 5
5 1
...

correct output
8

user output
(empty)

Feedback: Output is shorter than expected

Test 10

Subtask: 2, 3, 4, 5, 6

Verdict:

input
100 99 100
52 8
18 61
38 94
46 100
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 11

Subtask: 2, 5, 6

Verdict:

input
100 105 100
63 66
58 60
82 95
10 66
...

correct output
714878602

user output
(empty)

Feedback: Output is shorter than expected

Test 12

Subtask: 2, 5, 6

Verdict:

input
100 110 100
27 10
36 41
21 51
67 70
...

correct output
145213422

user output
(empty)

Feedback: Output is shorter than expected

Test 13

Subtask: 2, 5, 6

Verdict:

input
100 110 100
96 51
4 38
71 100
19 93
...

correct output
524970892

user output
(empty)

Feedback: Output is shorter than expected

Test 14

Subtask: 3, 4, 6

Verdict: ACCEPTED

input
200000 199999 1
134991 60803
22509 116499
162563 3398
95539 36685
...

correct output
1

user output
1

Test 15

Subtask: 3, 4, 6

Verdict:

input
200000 199999 1
179534 8479
157903 75758
191654 70014
74093 136641
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 16

Subtask: 3, 4, 6

Verdict:

input
200000 199999 2
73737 181461
152353 164598
39854 152630
113800 102119
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 17

Subtask: 3, 4, 6

Verdict: ACCEPTED

input
200000 199999 5
1864 74634
151242 167689
134304 34907
31191 144500
...

correct output
1

user output
1

Test 18

Subtask: 3, 4, 6

Verdict:

input
200000 199999 9582
81551 192132
19534 104640
189666 4048
159986 163627
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 19

Subtask: 3, 4, 6

Verdict: ACCEPTED

input
200000 199999 634
120113 131941
86436 121516
73453 144867
154099 187559
...

correct output
1

user output
1

Test 20

Subtask: 3, 4, 6

Verdict:

input
200000 199999 9999
156360 44775
133399 102816
97578 115279
85426 35248
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 21

Subtask: 3, 4, 6

Verdict:

input
200000 199999 10000
174018 18095
124289 134248
156163 61487
22692 183062
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 22

Subtask: 3, 4, 6

Verdict: ACCEPTED

input
200000 199999 9997
42421 142257
68681 66852
23753 189835
15920 152107
...

correct output
1

user output
1

Test 23

Subtask: 3, 4, 6

Verdict:

input
200000 199999 9997
7257 67775
137368 35287
136873 55062
139502 13649
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 24

Subtask: 3, 4, 6

Verdict:

input
200000 199999 10000
138530 194578
170092 135913
197846 30945
175841 29908
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 25

Subtask: 3, 4, 6

Verdict: ACCEPTED

input
200000 199999 10000
50586 65889
97656 199
82172 169565
135247 49398
...

correct output
1

user output
1

Test 26

Subtask: 3, 4, 6

Verdict:

input
200000 199999 10000
26219 140202
80751 156885
89074 31121
39686 45438
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 27

Subtask: 3, 4, 6

Verdict:

input
200000 199999 10000
73458 26638
24960 73149
98500 100006
135056 25566
...

correct output
0

user output
1

Feedback: Incorrect character on line 1 col 1: expected "0", got "1"

Test 28

Subtask: 4, 6

Verdict:

input
200000 200000 4
71063 170999
112262 167446
132778 41726
14927 149461
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 29

Subtask: 4, 6

Verdict:

input
200000 200000 9997
93623 73104
143620 21837
140012 178958
169412 155227
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 30

Subtask: 4, 6

Verdict:

input
200000 200000 9998
108676 85251
120626 53865
22185 185980
120315 133527
...

correct output
1

user output
(empty)

Feedback: Output is shorter than expected

Test 31

Subtask: 4, 6

Verdict:

input
200000 200000 9999
34043 45894
188478 191792
179114 18866
92725 139966
...

correct output
1

user output
(empty)

Feedback: Output is shorter than expected

Test 32

Subtask: 4, 6

Verdict:

input
200000 200000 10000
9844 33090
72074 105502
69473 85213
51479 27126
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 33

Subtask: 4, 6

Verdict:

input
200000 200000 8
198227 52374
153592 94277
62798 198081
9747 38403
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 34

Subtask: 4, 6

Verdict:

input
200000 200000 9999
38948 87012
75557 104481
136914 651
63353 76448
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 35

Subtask: 4, 6

Verdict:

input
200000 200000 10000
114749 43409
197006 178268
178476 26621
148333 1852
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 36

Subtask: 4, 6

Verdict:

input
200000 200000 9849
128248 41928
102409 136212
21468 167482
162722 46907
...

correct output
1

user output
(empty)

Feedback: Output is shorter than expected

Test 37

Subtask: 4, 6

Verdict:

input
200000 200000 9850
180582 124939
11693 87470
171894 114673
151571 38440
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 38

Subtask: 4, 6

Verdict:

input
200000 200000 9850
184412 83268
128807 44170
26253 126339
120550 69131
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 39

Subtask: 4, 6

Verdict:

input
200000 200000 10000
116047 12970
63831 182104
111914 38753
145557 89749
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 40

Subtask: 4, 6

Verdict:

input
200000 200000 10000
161162 192005
173486 5799
121169 117517
131073 50233
...

correct output
1

user output
(empty)

Feedback: Output is shorter than expected

Test 41

Subtask: 4, 6

Verdict:

input
200000 200000 9999
161162 192005
173486 5799
121169 117517
131073 50233
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 42

Subtask: 4, 6

Verdict:

input
200000 200000 9999
121115 10494
196280 116808
144717 31998
130883 84826
...

correct output
1

user output
(empty)

Feedback: Output is shorter than expected

Test 43

Subtask: 4, 6

Verdict:

input
200000 200000 9998
121115 10494
196280 116808
144717 31998
130883 84826
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 44

Subtask: 4, 6

Verdict:

input
200000 200000 10000
157121 120558
112994 175263
171516 106269
163986 185595
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 45

Subtask: 4, 6

Verdict:

input
200000 200000 9999
15645 65909
109001 114704
48122 116792
138487 55081
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 46

Subtask: 4, 6

Verdict:

input
200000 200000 10000
78578 123492
77698 40519
84219 64149
93230 51551
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 47

Subtask: 4, 6

Verdict:

input
200000 200000 10000
125797 61162
25525 189681
178938 104343
127938 99958
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 48

Subtask: 4, 6

Verdict:

input
200000 200000 10000
1 63340
1 117445
113745 1
194456 1
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 49

Subtask: 4, 6

Verdict:

input
200000 200000 10000
146958 200000
200000 54040
68156 200000
200000 55718
...

correct output
2

user output
(empty)

Feedback: Output is shorter than expected

Test 50

Subtask: 4, 6

Verdict:

input
200000 200000 10000
75759 1
1 122977
1 108735
1 44452
...

correct output
0

user output
(empty)

Feedback: Output is shorter than expected

Test 51

Subtask: 5, 6

Verdict:

input
1000 1001 10000
270 328
167 836
209 262
544 73
...

correct output
97138096

user output
(empty)

Feedback: Output is shorter than expected

Test 52

Subtask: 5, 6

Verdict:

input
1000 1005 10000
136 141
633 688
219 129
341 622
...

correct output
841074570

user output
(empty)

Feedback: Output is shorter than expected

Test 53

Subtask: 5, 6

Verdict:

input
1000 1010 10000
173 575
691 507
521 654
269 631
...

correct output
724704425

user output
(empty)

Feedback: Output is shorter than expected

Test 54

Subtask: 5, 6

Verdict:

input
1000 1010 10000
904 1000
236 1000
1000 316
1000 948
...

correct output
864991067

user output
(empty)

Feedback: Output is shorter than expected

Test 55

Subtask: 5, 6

Verdict:

input
1000 1010 10000
431 889
501 636
7 582
462 868
...

correct output
970435703

user output
(empty)

Feedback: Output is shorter than expected

Test 56

Subtask: 5, 6

Verdict:

input
1000 1010 10000
246 207
963 273
738 223
695 924
...

correct output
27240937

user output
(empty)

Feedback: Output is shorter than expected

Test 57

Subtask: 6

Verdict:

input
200000 200001 10000
73346 12940
91788 126866
191845 196823
1771 45039
...

correct output
980044634

user output
(empty)

Feedback: Output is shorter than expected

Test 58

Subtask: 6

Verdict:

input
200000 200005 10000
97853 177374
174818 82833
175749 181739
160817 150566
...

correct output
883528742

user output
(empty)

Feedback: Output is shorter than expected

Test 59

Subtask: 6

Verdict:

input
200000 200010 10000
8593 121197
90934 103451
173940 157010
55274 145619
...

correct output
79062217

user output
(empty)

Feedback: Output is shorter than expected

Test 60

Subtask: 6

Verdict:

input
200000 200010 10000
138445 200000
41553 200000
141229 200000
53521 200000
...

correct output
864991067

user output
(empty)

Feedback: Output is shorter than expected

Test 61

Subtask: 6

Verdict:

input
200000 200010 10000
9917 200000
24783 200000
200000 39037
14350 37168
...

correct output
471882140

user output
(empty)

Feedback: Output is shorter than expected

Test 62

Subtask: 6

Verdict:

input
200000 200010 10000
80269 156844
9747 1
104448 1
1 134193
...

correct output
235428850

user output
(empty)

Feedback: Output is shorter than expected