QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#606357#441. 制作菜品3un_larryfunc100 ✓842ms35756kbC++202.7kb2024-10-03 01:37:592024-10-03 01:37:59

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 5
Accepted
time: 3ms
memory: 10964kb

input:

10
4 2 50
13 39 35 13
4 3 45
19 55 34 27
4 3 47
18 33 20 70
4 2 48
5 8 40 43
4 2 47
8 37 25 24
4 2 46
1 10 45 36
4 2 49
2 5 47 44
4 2 49
34 31 25 8
4 2 45
27 31 21 11
4 2 50
35 12 27 26

output:

-1
1 19 2 26
4 27 3 18
3 16 2 29
1 18 4 29
3 20 4 27
4 14 2 33
2 8 3 40
1 5 4 43
-1
2 10 4 36
1 1 3 45
2 5 4 44
1 2 3 47
-1
-1
-1

result:

ok OK both got answer: NYYYNYYNNN

Test #2:

score: 5
Accepted
time: 0ms
memory: 11744kb

input:

10
4 2 50
16 24 30 30
4 3 47
2 79 53 7
4 3 50
32 61 44 13
4 2 50
1 6 44 49
4 2 47
19 21 26 28
4 2 46
10 10 36 36
4 2 46
5 2 41 44
4 2 47
33 29 26 6
4 2 45
34 32 23 1
4 2 45
27 11 29 23

output:

-1
1 2 2 45
4 7 3 40
3 13 2 34
4 13 2 37
2 24 3 26
3 18 1 32
2 6 3 44
1 1 4 49
2 21 3 26
1 19 4 28
1 10 3 36
2 10 4 36
1 5 3 41
2 2 4 44
-1
-1
-1

result:

ok OK both got answer: NYYYYYYNNN

Test #3:

score: 5
Accepted
time: 2ms
memory: 10996kb

input:

10
4 2 50
30 24 22 24
4 4 49
27 2 82 85
4 3 48
25 7 58 54
4 2 49
7 2 42 47
4 2 48
24 17 29 26
4 2 47
5 2 42 45
4 2 47
1 5 46 42
4 2 49
41 27 13 17
4 2 45
32 38 1 19
4 2 48
2 37 27 30

output:

-1
1 1 4 48
2 2 3 47
1 26 4 23
4 14 3 35
2 7 3 41
3 17 4 31
4 23 1 25
1 7 3 42
2 2 4 47
-1
1 5 3 42
2 2 4 45
2 5 4 42
1 1 3 46
-1
-1
-1

result:

ok OK both got answer: NYYYNYYNNN

Test #4:

score: 5
Accepted
time: 2ms
memory: 12368kb

input:

10
10 8 5000
5342 2288 3662 4105 4769 3942 5355 3406 4746 2385
10 9 4698
1039 6862 6700 5529 5825 3904 2539 5303 3551 1030
10 10 4730
4387 531 7610 2566 236 4490 2510 8625 8084 8261
10 8 4806
1147 891 10 173 1046 1138 853 1176 11527 20487
10 8 4719
6495 10158 2542 2599 2552 2821 2521 2457 2778 2829
...

output:

-1
10 1030 2 3668
1 1039 3 3659
7 2539 5 2159
3 3041 4 1657
2 3194 8 1504
9 3551 6 1147
6 2757 4 1941
4 1931 8 2767
8 1032 5 3666
1 1 8 4729
5 236 10 4494
2 531 9 4199
7 2510 3 2220
4 2566 3 2164
3 3226 6 1504
6 2986 1 1744
1 2642 8 2088
8 1808 9 2922
9 963 10 3767
7 853 9 3953
2 891 9 3915
1 1147 9...

result:

ok OK both got answer: NYYYYYYNNY

Test #5:

score: 5
Accepted
time: 0ms
memory: 11824kb

input:

10
10 8 5000
6157 6740 2393 3458 2043 1360 6248 1866 4221 5514
10 9 4538
2843 5424 4477 3285 6508 6308 1055 2505 3471 4966
10 10 4768
7647 4253 6258 1620 1896 5150 4265 7169 3108 6314
10 8 4530
203 386 695 553 454 907 161 138 7699 25044
10 8 4749
12629 3640 2377 2953 3034 2552 2594 2539 2971 2703
10...

output:

-1
7 1055 5 3483
8 2505 6 2033
1 2843 2 1695
5 3025 10 1513
4 3285 3 1253
3 3224 6 1314
6 2961 2 1577
2 2152 9 2386
9 1085 10 3453
1 4768
4 1620 8 3148
5 1896 10 2872
1 2879 3 1889
9 3108 6 1660
10 3442 3 1326
3 3043 7 1725
7 2540 2 2228
2 2025 8 2743
8 1278 6 3490
5 454 9 4076
6 907 9 3623
8 138 10...

result:

ok OK both got answer: NYYYNYYNNN

Test #6:

score: 5
Accepted
time: 0ms
memory: 3964kb

input:

10
500 499 5000
3843 636 8549 185 5830 892 8932 7825 5651 7620 6940 2405 7094 3940 1386 8882 8067 4484 5330 6806 6447 8253 1493 2867 4309 4942 2164 5890 4198 7743 7659 8054 8378 6352 8239 4353 7245 7315 2322 3040 5080 9262 5445 2318 3346 6831 1345 1557 1459 6674 8363 7906 5072 1 917 9381 4943 3081 5...

output:

54 1 141 4999
123 4 112 4996
210 20 348 4980
411 56 130 4944
458 60 468 4940
160 88 100 4912
71 143 262 4857
487 163 285 4837
248 180 353 4820
263 180 198 4820
4 185 221 4815
479 209 431 4791
287 311 65 4689
343 327 500 4673
390 329 467 4671
116 341 404 4659
166 408 306 4592
430 502 239 4498
164 506...

result:

ok OK both got answer: YYYYYYYYYY

Test #7:

score: 5
Accepted
time: 2ms
memory: 3848kb

input:

10
500 499 5000
6364 9285 10151 6902 4812 383 1398 4035 1971 9873 7569 5965 325 5298 1360 8638 1972 5110 4572 251 3205 9987 5918 5656 9501 10136 6777 5295 1349 9650 5545 7712 8543 5303 4221 2961 5686 5619 6996 7657 5099 4172 3229 5425 9470 4589 3669 1048 9699 8241 1300 2511 7835 7218 8167 6943 6961 ...

output:

372 57 152 4943
193 84 294 4916
255 149 267 4851
287 155 368 4845
361 211 143 4789
92 233 442 4767
120 242 138 4758
20 251 170 4749
137 257 204 4743
471 275 72 4725
265 298 3 4702
379 305 387 4695
13 325 26 4675
476 356 446 4644
237 360 348 4640
6 383 332 4617
450 383 277 4617
178 405 22 4595
312 42...

result:

ok OK both got answer: YYYYYYYYYY

Test #8:

score: 5
Accepted
time: 7ms
memory: 4144kb

input:

10
500 499 5000
3262 2165 5773 7999 8262 4733 3525 9726 2951 1150 7415 3911 8271 1083 1070 2438 5462 121 3183 3406 4427 604 9652 7737 3618 9228 586 3865 8022 5399 2492 1306 7564 8264 9304 5848 3019 2852 5597 5971 4002 3034 9882 2296 4117 974 4734 9579 1096 7917 3007 5522 8522 2682 3282 2162 1932 386...

output:

153 54 442 4946
430 63 60 4937
179 65 242 4935
213 80 301 4920
432 88 194 4912
189 92 451 4908
458 103 168 4897
347 109 291 4891
18 121 43 4879
336 145 409 4855
364 163 395 4837
461 166 109 4834
438 167 68 4833
254 206 352 4794
398 208 233 4792
351 228 92 4772
102 248 212 4752
279 292 75 4708
367 30...

result:

ok OK both got answer: YYYYYYYYYY

Test #9:

score: 5
Accepted
time: 6ms
memory: 4176kb

input:

10
500 499 5000
376 381 6759 4321 1893 4083 656 572 8961 7703 7497 2069 1181 1998 5786 6456 3949 5274 1870 1472 749 1478 8484 20 7946 3563 4574 2497 9538 6433 9457 9905 6814 6258 4268 8707 384 4925 9279 9345 2670 6818 1456 3851 8816 7242 349 2808 2558 2219 4280 3308 3697 2806 3327 1685 6369 7902 418...

output:

197 10 67 4990
24 20 65 4980
383 29 453 4971
170 31 299 4969
259 45 32 4955
92 49 360 4951
457 82 263 4918
257 100 470 4900
478 145 71 4855
462 181 143 4819
109 189 466 4811
66 208 87 4792
364 228 162 4772
230 236 235 4764
239 237 376 4763
243 245 346 4755
408 258 29 4742
47 349 248 4651
68 366 499 ...

result:

ok OK both got answer: YYYYYYYYYY

Test #10:

score: 5
Accepted
time: 7ms
memory: 12188kb

input:

10
25 23 5000
1582 1893 7547 6423 6090 3892 4873 4774 2419 2735 5981 2688 3103 6615 6641 5380 2563 5787 7635 7001 1653 7130 6048 1202 3345
25 4081 4766
1369984 261096 700757 803287 573341 1074135 738958 287371 722477 1506529 1248259 111432 430938 235065 1290857 961063 846904 1042705 718050 355187 15...

output:

12 2688 5 2312
13 3103 8 1897
8 2877 5 2123
5 1655 25 3345
24 1202 19 3798
1 1582 3 3418
21 1653 22 3347
2 1893 20 3107
9 2419 15 2581
17 2563 14 2437
10 2735 4 2265
22 3783 23 1217
19 3837 11 1163
6 3892 18 1108
20 3894 16 1106
15 4060 7 940
7 3933 23 1067
23 3764 11 1236
11 3582 18 1418
18 3261 16...

result:

ok OK both got answer: YYYYYYYYYN

Test #11:

score: 5
Accepted
time: 3ms
memory: 11384kb

input:

10
25 1181 462
27553 24516 201 15428 23094 32388 21669 7407 32798 40696 20339 22360 33207 21199 22486 32400 30281 21768 20176 4462 2709 25794 34237 21829 6625
25 23 490
56 500 3 104 62 39 17 83 10 110 44 14 16 94 30 43 51 4 117 65 16 102 456 4806 4428
25 23 480
47 75 21 508 41 3 48 57 10 70 589 96 5...

output:

1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 10 461
1 1 23 461
1 1 10 461
1 1 23 461
1 1 10 461
1 1 23 461
1 1 13 461
1 1 10 461
1 1 23 461
1 1 9 461
1 1 13 461
1 1 16 461
1 1 10 461
1 1 ...

result:

ok OK both got answer: YYYYYYYYYN

Test #12:

score: 5
Accepted
time: 0ms
memory: 12208kb

input:

10
25 1996 459
42271 3951 22551 39538 47172 12207 69249 32050 23450 71343 14663 50987 57351 29133 43127 42623 60062 37544 15504 39007 49586 17876 2088 70962 21869
25 23 492
68 65 77 77 12 8 40 58 24 93 5 46 69 1 92 48 75 56 43 44 111 3 2 4572 5627
25 23 470
496 17 88 437 56 86 66 38 86 86 92 13 100 ...

output:

1 1 10 458
1 1 24 458
1 1 10 458
1 1 24 458
1 1 10 458
1 1 24 458
1 1 10 458
1 1 24 458
1 1 10 458
1 1 7 458
1 1 24 458
1 1 10 458
1 1 7 458
1 1 24 458
1 1 10 458
1 1 7 458
1 1 24 458
1 1 10 458
1 1 7 458
1 1 24 458
1 1 10 458
1 1 7 458
1 1 24 458
1 1 10 458
1 1 7 458
1 1 24 458
1 1 10 458
1 1 7 458...

result:

ok OK both got answer: YYYYYYYYYY

Test #13:

score: 5
Accepted
time: 0ms
memory: 11380kb

input:

10
40 2512 475
13292 14201 12975 71320 26633 55182 40472 7861 24905 21752 36640 22060 55829 23162 33190 44623 15134 24868 26316 10462 6520 35857 72022 31604 16527 10443 72278 20073 4676 30582 16987 17966 44783 29963 16708 71415 12567 57181 6699 37472
40 38 459
62 59 50 64 101 45 19 48 66 23 56 10 34...

output:

1 1 27 474
1 1 23 474
1 1 27 474
1 1 23 474
1 1 36 474
1 1 27 474
1 1 4 474
1 1 23 474
1 1 36 474
1 1 27 474
1 1 4 474
1 1 23 474
1 1 36 474
1 1 27 474
1 1 4 474
1 1 23 474
1 1 36 474
1 1 27 474
1 1 4 474
1 1 23 474
1 1 36 474
1 1 27 474
1 1 4 474
1 1 23 474
1 1 36 474
1 1 27 474
1 1 4 474
1 1 23 47...

result:

ok OK both got answer: YYYYYYYYYN

Test #14:

score: 5
Accepted
time: 3ms
memory: 10636kb

input:

10
50 2076 493
13768 16083 2191 44149 4290 40590 31917 13314 17253 29746 38642 43320 35890 11453 39167 6759 4608 7908 24128 12150 47546 11145 21662 18819 6855 1750 32550 19098 14245 39372 8714 28012 7662 10904 24369 11953 3702 8493 25267 20955 38239 16116 16483 26336 27570 7857 33095 32177 15765 943...

output:

1 1 21 492
1 1 21 492
1 1 21 492
1 1 21 492
1 1 21 492
1 1 21 492
1 1 21 492
1 1 4 492
1 1 21 492
1 1 4 492
1 1 21 492
1 1 12 492
1 1 4 492
1 1 21 492
1 1 12 492
1 1 4 492
1 1 21 492
1 1 12 492
1 1 4 492
1 1 21 492
1 1 12 492
1 1 4 492
1 1 21 492
1 1 12 492
1 1 4 492
1 1 21 492
1 1 12 492
1 1 4 492
...

result:

ok OK both got answer: YYYYYYYYYY

Test #15:

score: 5
Accepted
time: 27ms
memory: 14928kb

input:

10
80 78 5000
8040 5713 8368 9134 8571 8109 7586 4125 7300 8857 8252 4188 5699 4785 6890 1459 1717 1611 4490 4584 6110 8045 3749 9170 3825 7975 5314 8649 3411 305 4924 2083 6018 3925 1850 5222 2667 69 9347 600 8926 8232 4789 5258 3649 2312 6717 5367 3923 1840 584 665 518 4333 468 4342 2941 5782 3624...

output:

34 3925 44 1075
77 4107 43 893
43 3896 14 1104
14 3681 19 1319
19 3171 54 1829
54 2504 12 2496
12 1692 44 3308
44 875 8 4125
38 69 39 4931
30 305 24 4695
55 468 4 4532
53 518 41 4482
72 545 10 4455
51 584 28 4416
40 600 5 4400
52 665 62 4335
66 917 63 4083
69 986 3 4014
76 1087 11 3913
16 1459 42 35...

result:

ok OK both got answer: YYYYNYYYYY

Test #16:

score: 5
Accepted
time: 20ms
memory: 13680kb

input:

10
90 88 5000
5484 8888 12 5876 2700 2940 353 5052 3730 1150 3821 2601 3969 1124 6851 5536 493 6681 3568 7776 2861 4548 2986 6888 3620 7790 9415 3136 606 6329 2623 6092 5736 2634 2487 8436 5574 2840 4007 9305 3991 7828 2425 7960 8952 9276 4015 9445 6476 7583 7739 9337 2650 1244 6744 6271 9034 6678 9...

output:

11 3821 90 1179
13 3969 33 1031
41 3991 65 1009
39 4007 90 993
90 3879 33 1121
33 3584 75 1416
75 3151 22 1849
22 2699 65 2301
65 1873 89 3127
89 985 47 4015
3 12 48 4988
85 28 27 4972
60 159 59 4841
83 171 52 4829
80 315 84 4685
7 353 40 4647
17 493 46 4507
79 525 64 4475
76 562 88 4438
29 606 57 4...

result:

ok OK both got answer: YYYYYYYYYY

Test #17:

score: 5
Accepted
time: 34ms
memory: 16240kb

input:

10
100 98 5000
8022 7712 6112 7663 1520 7578 2583 6276 5066 2892 9298 943 7244 2199 7090 5023 4145 2293 2574 1382 4442 5853 2144 4654 3331 2729 4068 7165 7453 7925 4978 5351 5506 959 2884 7027 8537 5467 3172 3473 8359 2340 4415 5473 4539 1375 365 8684 3668 2939 10066 8110 8792 2079 2633 1992 4807 67...

output:

83 4150 32 850
91 4193 57 807
57 4000 24 1000
24 3654 45 1346
45 3193 32 1807
32 2694 61 2306
61 2190 98 2810
98 1681 99 3319
99 1143 21 3857
21 585 43 4415
66 234 70 4766
47 365 51 4635
12 943 64 4057
34 959 78 4041
96 1092 75 3908
74 1128 11 3872
84 1236 59 3764
46 1375 53 3625
20 1382 48 3618
5 1...

result:

ok OK both got answer: YYYYYYYYYN

Test #18:

score: 5
Accepted
time: 255ms
memory: 26960kb

input:

10
300 298 5000
5030 5827 7011 8862 5150 6830 4727 2114 6063 4511 4362 9088 205 3225 1864 4129 7690 7517 1429 9553 5840 1890 1254 2099 7836 7291 3302 1049 9208 4207 2303 4386 173 9314 3387 5323 6283 8114 7436 2484 2764 1937 1711 2969 5163 3575 7098 2992 1231 8527 2684 7072 556 3938 9171 8392 1368 26...

output:

169 4364 223 636
32 4386 63 614
104 4427 1 573
1 4457 7 543
7 4184 270 816
270 3910 229 1090
229 3487 201 1513
201 3025 241 1975
241 2560 10 2440
10 2071 173 2929
173 1560 63 3440
63 1047 223 3953
223 528 202 4472
70 29 95 4971
133 52 256 4948
209 130 78 4870
244 143 296 4857
117 162 143 4838
152 17...

result:

ok OK both got answer: YYYYYYYYYY

Test #19:

score: 5
Accepted
time: 438ms
memory: 31532kb

input:

10
400 398 5000
2279 4205 8320 5468 9047 6440 1995 3019 2232 1218 9740 2414 8351 9403 6770 8485 6427 2827 5318 2800 2239 8052 101 4435 7548 1757 2323 4880 899 209 4509 3183 4414 2567 8651 3200 9007 384 6218 977 1602 5697 3391 9954 4839 10161 8177 1005 2727 3234 3804 4966 1025 3906 9401 8573 5663 146...

output:

244 4475 350 525
350 4480 52 520
52 4446 130 554
130 4360 28 640
28 4240 221 760
221 4103 161 897
161 3956 45 1044
45 3795 124 1205
124 3599 226 1401
226 3385 166 1615
166 3171 155 1829
155 2888 291 2112
291 2587 123 2413
123 2204 220 2796
220 1813 379 3187
379 1409 254 3591
254 987 31 4013
31 496 2...

result:

ok OK both got answer: YYYYYYYYYY

Test #20:

score: 5
Accepted
time: 842ms
memory: 35756kb

input:

10
500 498 5000
9985 2503 9725 1832 2649 714 9735 4079 8786 8366 10289 598 6536 5521 1487 2592 5197 8514 9590 6334 3817 4141 4407 7125 7338 1365 6816 9153 2880 6832 1744 2229 9336 833 4061 1349 1547 3160 5428 10333 890 5081 296 7426 10602 1783 10018 5163 10297 8971 861 3478 2476 5268 10603 9814 6633...

output:

189 4443 42 557
450 4463 123 537
123 4468 199 532
199 4386 339 614
339 4255 492 745
492 4093 488 907
488 3924 200 1076
200 3730 128 1270
128 3509 183 1491
183 3283 266 1717
266 3026 97 1974
97 2700 99 2300
99 2308 241 2692
241 1862 462 3138
462 1412 494 3588
494 956 42 4044
42 480 141 4520
323 11 16...

result:

ok OK both got answer: YYYYYYYYYY

Extra Test:

score: 0
Extra Test Passed