QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#59482#3456. Absurdistan Roads IIILHAC ✓1398ms139160kbJava111.3kb2022-10-29 17:02:422022-10-29 17:03:25

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 225ms
memory: 50820kb

input:

4
1 2
2 3
3 1
4 1

output:

4 1
1 2
2 3
3 1

result:

ok 

Test #2:

score: 0
Accepted
time: 260ms
memory: 51092kb

input:

2
1 2
1 2

output:

1 2
2 1

result:

ok 

Test #3:

score: 0
Accepted
time: 279ms
memory: 50080kb

input:

4
1 2
2 3
3 2
4 1

output:

4 1
1 2
2 3
3 2

result:

ok 

Test #4:

score: 0
Accepted
time: 214ms
memory: 50792kb

input:

2
1 2
2 1

output:

1 2
2 1

result:

ok 

Test #5:

score: 0
Accepted
time: 261ms
memory: 52348kb

input:

21
4 2
9 17
10 1
14 6
10 17
18 6
16 21
2 3
20 7
11 16
19 9
21 5
7 1
11 13
20 8
14 12
3 15
12 15
13 18
5 8
19 4

output:

1 10
10 17
17 9
9 19
19 4
4 2
2 3
3 15
15 12
12 14
14 6
6 18
18 13
13 11
11 16
16 21
21 5
5 8
8 20
20 7
7 1

result:

ok 

Test #6:

score: 0
Accepted
time: 1312ms
memory: 139160kb

input:

100000
18003 76754
5781 65148
17639 55297
575 99159
6166 58611
18032 56059
2527 91515
4473 76350
84783 21307
86177 62048
92082 99839
41490 82427
85354 80783
46910 35482
45612 29170
45627 18115
51942 91343
10140 50372
92291 83317
96022 14641
37657 97032
18657 12466
36484 11730
87864 84307
67721 58602...

output:

1 26326
26326 2306
2306 30808
30808 19844
19844 23055
23055 14528
14528 25629
25629 89518
89518 72471
72471 39564
39564 30834
30834 2541
2541 41870
41870 93815
93815 81481
81481 16935
16935 92252
92252 26973
26973 11561
11561 4945
4945 92040
92040 82107
82107 23090
23090 7186
7186 82034
82034 71062
...

result:

ok 

Test #7:

score: 0
Accepted
time: 281ms
memory: 53012kb

input:

58
47 40
21 47
47 7
47 38
47 44
47 22
14 47
47 24
47 1
47 10
47 2
32 19
52 47
47 49
56 47
47 16
47 51
47 37
11 47
47 27
3 47
47 23
39 47
47 43
45 47
47 42
47 20
47 36
29 47
28 47
47 53
47 32
19 47
9 47
13 47
30 47
46 47
55 47
47 6
47 41
35 47
47 31
47 26
47 34
8 47
58 47
47 33
47 4
47 48
47 18
50 47...

output:

58 47
57 47
56 47
55 47
54 47
53 47
52 47
51 47
50 47
49 47
48 47
46 47
45 47
44 47
43 47
42 47
41 47
40 47
39 47
38 47
37 47
36 47
35 47
34 47
33 47
31 47
30 47
29 47
28 47
27 47
26 47
25 47
24 47
23 47
22 47
21 47
20 47
18 47
17 47
16 47
15 47
14 47
13 47
12 47
11 47
10 47
9 47
8 47
7 47
6 47
5 47...

result:

ok 

Test #8:

score: 0
Accepted
time: 946ms
memory: 115092kb

input:

40000
22353 31869
14679 31869
38044 31869
37418 31869
31869 3420
11132 31869
31869 26605
31869 12244
31869 12424
31869 26808
31869 809
31869 26006
31869 25386
3792 31869
13251 31869
28542 31869
19037 31869
31869 23304
31869 9575
36064 31869
31869 13941
6133 31869
17295 31869
31869 239
31869 19036
31...

output:

40000 31869
39999 31869
39998 31869
39997 31869
39996 31869
39995 31869
39994 31869
39993 31869
39992 31869
39991 31869
39990 31869
39989 31869
39988 31869
39987 31869
39986 31869
39985 31869
39984 31869
39983 31869
39982 31869
39981 31869
39980 31869
39979 31869
39978 31869
39977 31869
39976 31869
...

result:

ok 

Test #9:

score: 0
Accepted
time: 296ms
memory: 52296kb

input:

45
25 38
31 21
4 16
11 41
5 14
36 26
27 25
43 45
26 12
15 6
41 40
22 30
23 16
37 7
2 11
28 24
17 33
41 27
6 10
19 35
22 42
19 34
15 18
3 9
38 44
5 13
1 8
4 8
14 17
13 12
35 24
33 39
32 1
31 7
39 2
36 32
3 29
43 20
40 45
11 37
9 21
23 20
42 34
29 30
10 44

output:

28 24
24 35
35 19
19 34
34 42
42 22
22 30
30 29
29 3
3 9
9 21
21 31
31 7
7 37
37 11
18 15
15 6
6 10
10 44
44 38
38 25
25 27
27 41
1 8
8 4
4 16
16 23
23 20
20 43
43 45
45 40
40 41
41 11
11 2
2 39
39 33
33 17
17 14
14 5
5 13
13 12
12 26
26 36
36 32
32 1

result:

ok 

Test #10:

score: 0
Accepted
time: 907ms
memory: 96644kb

input:

30000
26 4091
12417 15212
25614 44
18308 27412
25567 16723
25976 22849
1104 9210
14339 19088
24497 27535
11733 5015
25936 2212
17506 11411
16031 3774
15119 10892
14398 9318
28110 16197
10868 2239
29318 9184
23861 23740
18802 19319
1577 22745
6248 15083
2715 2394
29560 4872
29544 5014
4477 17987
2898...

output:

24515 18903
18903 15214
15214 16900
16900 23294
23294 23588
23588 8783
8783 19252
19252 12935
12935 7668
7668 7831
7831 29444
29444 25737
25737 15882
15882 13330
13330 15259
15259 5497
5497 16229
16229 10930
10930 13039
13039 3955
3955 3976
3976 5795
5795 25345
25345 29390
29390 1583
1583 2717
2717 ...

result:

ok 

Test #11:

score: 0
Accepted
time: 285ms
memory: 52672kb

input:

26
1 12
19 1
25 3
6 16
21 22
20 9
5 1
13 3
1 6
11 24
2 26
20 18
16 4
24 14
14 10
16 25
3 20
17 13
23 24
14 7
20 19
11 19
24 21
8 11
15 2
3 2

output:

26 2
23 24
22 21
21 24
18 20
17 13
13 3
15 2
2 3
12 1
10 14
9 20
8 11
7 14
14 24
24 11
11 19
5 1
4 16
1 19
19 20
20 3
3 25
25 16
16 6
6 1

result:

ok 

Test #12:

score: 0
Accepted
time: 245ms
memory: 52388kb

input:

4
3 1
1 4
2 4
3 2

output:

1 3
3 2
2 4
4 1

result:

ok 

Test #13:

score: 0
Accepted
time: 210ms
memory: 52752kb

input:

60
32 23
55 58
1 49
53 33
27 12
35 25
45 51
40 37
52 54
44 20
48 14
16 43
24 5
5 58
58 37
53 31
51 3
29 9
17 59
31 55
46 60
19 27
2 29
34 54
47 29
41 48
31 38
48 39
9 50
16 7
22 19
55 57
41 55
8 28
56 50
49 55
6 17
19 16
54 23
31 26
14 47
26 15
34 17
10 37
4 11
8 49
57 20
11 31
49 21
19 13
9 18
14 3...

output:

60 46
46 14
59 17
56 50
50 9
52 54
44 20
20 57
57 55
43 16
40 37
39 48
38 31
36 17
33 53
32 23
30 14
28 8
8 49
25 35
35 53
53 31
24 5
5 58
22 19
21 49
15 26
13 19
12 27
27 19
19 16
10 37
7 16
16 26
26 31
6 17
17 34
34 54
54 23
4 11
11 31
3 51
51 45
45 42
42 37
37 58
58 55
2 29
1 49
49 55
9 29
29 47
...

result:

ok 

Test #14:

score: 0
Accepted
time: 970ms
memory: 89484kb

input:

26065
12168 6781
2796 14042
7492 18368
2435 4695
9363 23022
12740 24153
22462 8884
4817 15365
12295 9247
12744 14669
17418 16773
1078 25700
12481 8349
21422 9370
12530 5919
17544 25244
10377 17758
15412 10608
9132 2425
14899 13281
3709 25559
7913 531
25470 11183
3265 8449
24162 25723
18567 15978
185...

output:

26064 17719
26056 3369
26053 4674
26052 22827
22827 23186
26050 16348
16348 14126
26048 7393
7393 25275
26047 20411
26046 11746
26045 19964
26044 11453
11453 11575
11575 9231
26042 19788
19788 16889
26041 17889
26037 2548
26035 6857
6857 7285
26031 20582
26030 18634
18634 408
26029 6804
6804 23094
2...

result:

ok 

Test #15:

score: 0
Accepted
time: 1125ms
memory: 135268kb

input:

52784
48017 14799
8170 3483
16596 23677
46997 3129
23268 28796
24746 9600
5963 43089
31144 41265
32202 18671
12273 9231
38525 35079
9360 39977
3065 6622
42396 39395
43495 43073
6883 18310
40704 48192
5400 50541
45489 11106
4630 22208
5664 33658
2967 39928
8056 17422
28710 43327
2084 32693
21980 4769...

output:

52783 33058
52782 12601
12601 36033
52781 16733
52780 12084
12084 28143
28143 11558
11558 9859
52777 13874
13874 7238
52776 24546
52775 9227
52774 46604
46604 43547
43547 47641
47641 34495
52772 49124
52770 18059
52769 23368
23368 22389
52768 43544
52767 16420
52763 12445
52759 1388
1388 38851
52758...

result:

ok 

Test #16:

score: 0
Accepted
time: 1190ms
memory: 136272kb

input:

69310
51961 23475
5906 58170
37295 40796
24891 15728
6700 16163
18661 53916
30616 12129
25370 2488
20104 61563
45292 34059
16397 50160
40185 60370
28267 56388
68048 20060
61246 52307
3076 21497
18336 67730
33905 27550
41372 47957
68652 31552
18680 52385
17952 52650
31856 302
16980 2054
19701 24700
5...

output:

69306 41222
69305 67214
69304 36195
36195 66784
69303 14358
69300 42658
69299 31059
69297 26752
26752 34214
34214 9713
69296 50476
69295 48470
69294 60459
69293 19592
69291 36379
36379 47991
69290 51805
69289 65484
65484 55240
69287 55991
69286 39701
69282 7335
69274 12640
12640 20527
69269 66238
66...

result:

ok 

Test #17:

score: 0
Accepted
time: 1380ms
memory: 135880kb

input:

100000
72036 30614
98597 39055
26611 33745
7356 19189
92422 13640
14520 77243
24866 98955
68640 21354
64493 488
34851 72539
40515 42397
42084 97013
21490 53643
27878 35393
50405 58933
66183 86258
20660 35738
30936 36680
32239 90234
28771 28971
57623 88282
11549 10865
32912 45074
53664 44408
5639 459...

output:

100000 59065
99999 81114
99996 4156
99995 27894
99993 19286
99992 76513
76513 1354
1354 61762
99990 57475
57475 98294
99989 15460
99986 82223
82223 35693
99985 68871
68871 1670
99983 59319
59319 47116
99982 19165
19165 90209
99981 12648
99975 61125
99972 75562
99970 62115
99969 78278
78278 49639
999...

result:

ok 

Test #18:

score: 0
Accepted
time: 1289ms
memory: 134160kb

input:

100000
88051 20382
71840 38374
30976 21881
39223 87529
20594 42998
47688 84004
22555 29223
48589 22355
72688 59407
86095 96331
90603 89396
59668 67980
33748 94725
23510 69049
3388 72952
4462 17203
22237 40836
11231 30857
12004 3372
90729 173
42838 53051
57028 81948
3922 85780
33891 90764
93454 56831...

output:

99999 95307
99998 30014
99996 80511
99995 13535
13535 20974
20974 75221
99993 59252
59252 70726
70726 22354
99980 66764
99978 8980
99977 26550
99969 85813
99968 67492
99967 6744
99966 51744
99965 89795
99962 94849
99959 11845
99956 65525
65525 54187
54187 85200
99954 3643
3643 90820
90820 83128
9995...

result:

ok 

Test #19:

score: 0
Accepted
time: 1398ms
memory: 132308kb

input:

100000
42767 42021
13243 91712
14259 5132
76423 64357
41686 70580
97209 45002
52375 28718
64257 64895
36614 5594
72033 71163
96996 54938
82643 38347
45794 35783
12634 98661
32920 53713
12318 16835
34579 89337
18764 69610
61916 34618
82054 92702
49831 60520
77078 30511
92781 56463
96872 68859
8725 83...

output:

100000 80959
80959 87711
87711 30668
99990 85372
85372 2142
2142 90067
99986 8742
99982 66285
66285 69195
99981 85690
85690 19839
19839 56881
99977 84102
99976 644
99973 60079
99969 30416
99967 65733
65733 69988
99966 38411
99964 20246
99963 27699
27699 88184
99960 94891
99959 87684
87684 41672
4167...

result:

ok 

Test #20:

score: 0
Accepted
time: 1041ms
memory: 129400kb

input:

52322
26704 9044
28154 51134
1021 27098
36296 18169
26890 22993
18764 40950
18983 9906
32665 50131
32653 39839
15650 11003
48335 13607
16194 30822
51982 51144
15056 20554
44374 16046
477 21264
27147 44642
18582 16675
1551 4931
44577 35906
39458 44434
2771 34983
29654 12146
34956 50718
31213 2105
238...

output:

52322 16551
16551 35385
35385 50941
50941 9686
52321 37341
52320 14942
52312 44597
52311 48126
52309 30514
30514 16264
16264 24233
52308 23068
52302 31151
52300 46129
52297 23655
52293 10650
52288 18417
18417 13005
13005 10414
10414 23521
52283 30882
30882 48003
52276 1230
52275 9871
52274 52078
520...

result:

ok 

Test #21:

score: 0
Accepted
time: 813ms
memory: 69580kb

input:

17832
13699 525
4225 7930
7752 15044
2421 8287
12782 3921
340 7301
17349 7321
12789 4380
7010 5872
2072 2890
17624 15326
11525 8101
10390 2876
12494 13024
16590 17806
15690 17814
16 1224
14925 1782
2981 4542
4389 9894
10463 1691
2526 8426
11111 6239
16203 15343
3537 14962
11009 11651
3115 16458
3455...

output:

17831 7554
7554 13315
13315 16517
16517 7774
7774 2413
17826 1246
17825 9646
9646 5743
5743 1308
1308 15016
17823 606
606 1576
17821 4087
4087 15906
17818 14935
17816 14103
17813 12952
17810 1565
1565 17293
17807 2382
17803 9852
17798 9883
17796 12188
12188 1211
17793 7620
17792 17832
17791 2762
177...

result:

ok 

Test #22:

score: 0
Accepted
time: 221ms
memory: 46236kb

input:

4
1 2
2 1
3 4
4 3

output:

1 2
2 1
3 4
4 3

result:

ok