QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#464376#7517. Flying Ship Storyucup-team3884#TL 967ms3872kbC++201.8kb2024-07-06 02:32:572024-07-06 02:32:59

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3836kb

input:

5
1 2 3 1
1 4 5 2
2 2 2
2 3 7
2 3 4

output:

2
1
0

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 315ms
memory: 3644kb

input:

1000000
2 370943499 431961772
1 1 1 11995570
2 37566858 838793045
1 11995571 11995569 908148975
2 11995571 11995571
1 1 3 716821068
2 67877937 3
1 11995571 11995571 771898489
2 38381714 99749723
1 915818844 915818847 729541681
2 592361351 915818846
1 783627722 783627722 639375021
2 102203700 8636489...

output:

0
11995570
0
11995570
915818845
783627723
915818845
0
0
915818845
0
783627723
0
904468304
904468304
904468304
915818845
904468304
915818845
904468304
915818845
0
904468304
0
915818845
915818845
0
0
915818845
915818845
0
921710773
0
921710773
998138906
921710773
0
921710773
998138906
0
998138906
0
99...

result:

ok 500000 lines

Test #3:

score: 0
Accepted
time: 388ms
memory: 3580kb

input:

1000000
2 648544745 437316088
1 1 1 221075686
2 802693951 691188141
1 221075687 221075684 1036811136
2 771835961 178451319
1 820061031 820061031 560017372
2 829408420 820061028
1 293604539 293604539 699366423
2 293604539 293604539
1 1 2 610044241
2 50747012 885321059
1 942633132 942633132 603537610
...

output:

0
221075686
820061030
293604538
0
942633133
942633133
27478144
820061030
820061030
900696946
27478144
942633133
942633133
0
772167494
27478144
891145650
900696946
772167494
891145650
918281274
772167494
772167494
772167494
772167494
772167494
942633133
918281274
891145650
918281274
891145650
8911456...

result:

ok 500000 lines

Test #4:

score: 0
Accepted
time: 967ms
memory: 3872kb

input:

1000000
2 488777832 43440411
1 441939805 62137297 1349
2 198318033 382339804
1 441938456 72190649 815
2 458351680 72190649
1 441938456 287971850 290
2 161496970 653240491
1 933968337 49827233 1142
2 441938231 49827233
1 623590902 306969890 440
2 441939805 144230480
1 441939265 480404387 11460
2 4419...

output:

0
1349
1349
1642
0
540
440
440
440
11992
4593
4228
9603
4228
12488
7139
4593
14051
14051
14051
16301
4593
20640
14051
34628
20640
34628
35421
34628
34628
49987
11225
17743
11225
17743
35421
17743
35421
17743
49987
56227
56227
11225
11225
56227
56227
56227
56227
56227
37643
37643
49987
37643
37643
21...

result:

ok 500000 lines

Test #5:

score: 0
Accepted
time: 850ms
memory: 3656kb

input:

1000000
2 300988902 687022441
1 363810072 24403398 289
2 441308798 688376935
1 628472989 502933923 685
2 628472989 24403175
1 405185660 444382475 5415
2 405185660 502933634
1 628472989 220347248 2326
2 405185885 151256307
1 38349408 55729241 318
2 996330001 736739645
1 628467867 508628958 4399
2 567...

output:

0
289
0
289
2103
5415
5415
2103
8914
10615
3349
3349
8956
3349
10129
10129
6943
15708
10615
15708
10615
15708
10615
16924
13341
13341
16924
16924
16924
40745
16924
21956
40745
12104
40745
20471
40745
40745
20471
40745
40745
63618
40745
63618
63618
18063
63618
63618
63618
79351
79351
79351
79351
6361...

result:

ok 500000 lines

Test #6:

score: 0
Accepted
time: 876ms
memory: 3660kb

input:

1000000
2 111806459 80284370
1 796602332 100051686 438
2 286632803 842428594
1 34142446 621400092 731
2 53723669 621400092
1 449442772 930459341 4955
2 443764325 137040488
1 748083857 223767926 8188
2 969939167 515353275
1 989422739 346378721 4227
2 748083857 930463126
1 103490800 749046598 2463
2 3...

output:

0
438
438
4845
4845
877
4845
3345
3345
3345
3345
6408
6416
7738
3656
3656
11278
3656
13839
11278
33567
33567
5723
33567
28274
28274
8997
11278
48613
33567
8997
11278
8997
8997
13336
26477
48613
13336
48613
13336
13336
48613
26477
26766
13336
73778
73778
58976
42110
42110
22285
73778
73778
73778
7377...

result:

ok 500000 lines

Test #7:

score: 0
Accepted
time: 888ms
memory: 3580kb

input:

1000000
2 718033726 616016120
1 665760898 359791620 366
2 665760898 204722547
1 452321281 333162973 3799
2 60737187 883719093
1 452325078 2420293 2737
2 464822496 333162250
1 897358098 996437487 472
2 795171894 333163963
1 455003715 996437047 3228
2 787981736 996272822
1 882324943 996435806 3458
2 4...

output:

0
0
3799
1126
1470
3799
1470
1470
705
7238
3252
2338
3252
10340
10340
8986
5114
5114
5114
13813
17199
10340
18118
18118
21931
21931
5114
21931
21931
21931
29195
29195
15488
35715
31726
57783
15488
33759
33759
57783
15488
15488
68258
68258
15488
68258
33759
87915
33759
15488
15488
33759
33759
68258
1...

result:

ok 500000 lines

Test #8:

score: -100
Time Limit Exceeded

input:

1000000
2 78038813 250486402
1 695391094 534886695 519
2 304811423 718140553
1 158043817 277922962 304
2 803420509 772623626
1 856526470 455200407 6075
2 856526470 211646382
1 589013496 642317455 2046
2 856526470 781887716
1 3773409 455199081 7129
2 489372518 198447772
1 695389286 769439586 7294
2 4...

output:

0
519
823
823
1225
7952
1225
7952
5260
3036
7952
7952
5260
7952
7952
15312
15312
7952
15312
15312
16011
16011
16011
10390
15174
15312
16011
16011
16011
21629
37469
44676
21629
11376
21629
44676
44676
11376
21629
63531
14384
21629
14384
62379
62379
17290
62379
62379
63531
17290
62379
63531
63531
6353...

result: