QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#30549#2415. Firetrucks Are RedrepomanTL 416ms12776kbC++1.2kb2022-04-29 23:42:002022-04-29 23:42:01

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 3548kb

input:

2
1 144272510
1 144272510

output:

2 1 144272510

result:

ok 

Test #2:

score: 0
Accepted
time: 1ms
memory: 3604kb

input:

2
3 926756583 60721576 911666163
1 926756583

output:

2 1 926756583

result:

ok 

Test #3:

score: 0
Accepted
time: 1ms
memory: 3496kb

input:

10
2 853832590 668835602
1 668835602
1 384974576
2 274281999 796487719
3 668835602 384974576 853832590
3 274281999 796487719 668835602
4 668835602 274281999 853832590 384974576
2 796487719 274281999
1 384974576
1 274281999

output:

2 1 668835602
5 1 668835602
5 3 384974576
6 4 274281999
6 1 668835602
7 1 668835602
8 4 796487719
9 3 384974576
10 4 274281999

result:

ok 

Test #4:

score: 0
Accepted
time: 3ms
memory: 3608kb

input:

100
2 342937749 285101060
2 579015745 292807338
3 456017432 101157443 285101060
1 280913935
2 859297027 444536025
2 504931657 783643441
2 456017432 360328443
2 655033009 977719989
2 23503993 86510939
1 280913935
3 882566438 400677901 280913935
4 285101060 711696014 782637467 655033009
1 504931657
1 ...

output:

impossible

result:

ok 

Test #5:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

20
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1

output:

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

result:

ok 

Test #6:

score: 0
Accepted
time: 416ms
memory: 10200kb

input:

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

output:

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

result:

ok 

Test #7:

score: 0
Accepted
time: 2ms
memory: 3524kb

input:

6
2 17 10
1 5
2 10 22
3 17 22 9
2 17 8
3 9 22 16

output:

impossible

result:

ok 

Test #8:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

6
2 17 10
2 5 10
2 10 22
3 17 22 9
2 17 8
3 9 22 16

output:

2 1 10
3 1 10
4 1 17
5 1 17
6 4 9

result:

ok 

Test #9:

score: 0
Accepted
time: 169ms
memory: 10576kb

input:

2
100135 50111079 636408060 792100042 5331285 336232714 372531348 162635402 202613385 334090836 434578373 974884818 991177868 34904916 852254962 932427235 990037224 28539707 529294723 999535479 92353517 160063080 301178333 783582003 898654302 448001960 798608014 499842001 640408898 149094210 9433621...

output:

2 1 6967534

result:

ok 

Test #10:

score: 0
Accepted
time: 151ms
memory: 10736kb

input:

2
100205 402692425 947048076 726644125 19396699 862992483 245024640 740973675 980569112 910684526 801789052 557001194 245807612 61789671 812894241 226721911 929071642 127202795 669601395 762104667 274761931 736916240 633593859 295582544 557936950 541234480 853475793 409017481 571982228 320919975 148...

output:

2 1 891773279

result:

ok 

Test #11:

score: 0
Accepted
time: 4ms
memory: 3740kb

input:

1000
1 170570389
1 876309004
1 270859704
1 681063235
3 388428750 214660301 173343388
2 230530420 459123744
2 425028352 430985812
2 888134465 613326043
3 937167878 531627138 892379916
1 66423869
1 427424009
1 86523514
3 353975089 939671730 250542715
1 297337445
1 681192098
3 581503268 664754894 49731...

output:

impossible

result:

ok 

Test #12:

score: 0
Accepted
time: 95ms
memory: 3572kb

input:

1000
196 353335732 409189874 700840930 330445933 481862392 520871605 16334747 286519743 757135435 336218173 371759648 246353297 587875214 775977271 277408406 445423784 897302904 144984294 159136901 239018567 120141137 815375811 768250891 370067413 169973067 147431809 135776656 669999566 368541780 47...

output:

2 1 623486952
3 1 539643958
4 1 510965165
5 1 489377
6 1 183296006
7 6 461201450
8 3 236174915
9 3 701716027
10 2 543934154
11 7 67617718
12 3 85492826
13 1 478946154
14 5 548658040
15 6 282515939
16 2 714064301
17 8 981203936
18 10 290858846
19 5 73688105
20 7 962668189
21 3 534273032
22 14 7908757...

result:

ok 

Test #13:

score: 0
Accepted
time: 112ms
memory: 4116kb

input:

1000
189 828192941 685817733 678017774 41116968 572481375 371245577 332259182 647183053 54592220 490654862 280198999 816286534 67217910 266490029 183296111 881325755 423521527 199040467 773986454 126627449 878841975 158056460 708000087 942344906 982273186 148549394 807148449 36561902 75342254 466857...

output:

2 1 76846401
3 1 513696672
4 2 606325809
5 2 17690272
6 5 470255501
7 3 642221437
8 2 378504159
9 3 34211702
10 4 586294833
11 3 250437155
12 8 688643791
13 8 313810697
14 1 979544598
15 6 338379247
16 10 169602155
17 2 502399000
18 15 57028488
19 12 250258246
20 14 749523418
21 3 545703113
22 18 73...

result:

ok 

Test #14:

score: 0
Accepted
time: 188ms
memory: 12776kb

input:

200000
1 338399905
1 776534810
1 145642942
1 204041132
1 903206281
1 97213556
1 623800194
1 274470932
1 462713477
1 427531118
1 161862854
1 601371719
1 852865573
1 843902403
1 255426727
1 621765222
1 171216106
1 786755429
1 779543103
1 912736055
1 692014287
1 942045680
1 770693979
1 898055070
1 2407...

output:

impossible

result:

ok 

Test #15:

score: -100
Time Limit Exceeded

input:

200000
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485738844
1 485...

output:

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

result: