QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#241367#7680. Subwayucup-team1878#AC ✓1ms3864kbC++235.7kb2023-11-06 03:41:292023-11-06 03:41:29

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1 2 1
2 1 2
3 3 2

output:

2
6 3 3 14 22020 2 1 13 22018 1 2 12 22019
5 3 3 20 34029 2 1 19 34027 18 34028

result:

ok ok Sum L = 11

Test #2:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

1
1 1 1

output:

1
2 1 1 12 22018

result:

ok ok Sum L = 2

Test #3:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

1
1 1 50

output:

50
2 1 1 12 22018
2 1 1 18 34027
2 1 1 24 46036
2 1 1 30 58045
2 1 1 36 70054
2 1 1 42 82063
2 1 1 48 94072
2 1 1 54 106081
2 1 1 60 118090
2 1 1 66 130099
2 1 1 72 142108
2 1 1 78 154117
2 1 1 84 166126
2 1 1 90 178135
2 1 1 96 190144
2 1 1 102 202153
2 1 1 108 214162
2 1 1 114 226171
2 1 1 120 238...

result:

ok ok Sum L = 100

Test #4:

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

input:

50
662 -567 48
728 -120 7
307 669 27
-885 -775 21
100 242 9
-784 -537 41
940 198 46
736 -551 30
-449 456 16
-945 382 18
-182 810 49
213 187 44
853 245 48
617 -305 19
-81 261 3
617 208 8
-548 -652 6
-888 -667 14
-371 -812 43
202 -702 10
-668 -725 5
961 -919 33
-870 -697 50
428 810 29
560 405 7
348 -3...

output:

50
100 961 -919 972 21098 940 198 951 22215 885 -57 896 21960 853 245 864 22262 846 -163 857 21854 736 -551 747 21466 728 -120 739 21897 684 360 695 22377 662 -567 673 21450 617 -305 628 21712 617 208 628 22225 560 405 571 22422 507 469 518 22486 506 -175 517 21842 428 810 439 22827 348 -322 359 216...

result:

ok ok Sum L = 3693

Test #5:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

50
-772 697 1
-756 -909 1
659 923 1
850 471 1
260 -24 1
473 -639 1
-575 393 1
-466 197 1
333 -637 1
-192 -890 1
103 546 1
749 -723 1
-573 613 1
214 -138 1
277 928 1
266 291 1
911 275 1
-680 -67 1
69 190 1
-197 -795 1
684 618 1
729 -115 1
-658 -229 1
-595 -470 1
898 -172 1
401 81 1
133 685 1
223 400 ...

output:

1
100 995 711 1006 22728 911 275 922 22292 898 -172 909 21845 850 471 861 22488 749 -723 760 21294 729 -115 740 21902 684 618 695 22635 659 923 670 22940 505 68 516 22085 473 -639 484 21378 401 81 412 22098 360 -630 371 21387 333 -637 344 21380 277 928 288 22945 266 291 277 22308 260 -24 271 21993 2...

result:

ok ok Sum L = 100

Test #6:

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

input:

50
-56 747 3
993 -490 4
930 -139 1
-298 -330 1
938 -351 5
-973 100 5
-472 44 4
345 628 5
481 -91 4
789 581 5
457 -29 4
871 -799 1
692 994 4
699 854 2
893 -33 1
-483 256 3
-962 -540 2
846 -893 1
830 609 5
845 -383 2
-552 -966 1
-544 -51 1
564 186 4
-615 -675 1
618 -911 3
-561 -302 4
-293 667 3
-334 -...

output:

5
100 993 -490 1004 21527 938 -351 949 21666 930 -139 941 21878 893 -33 904 21984 871 -799 882 21218 846 -893 857 21124 845 -383 856 21634 840 -638 851 21379 830 609 841 22626 826 959 837 22976 789 581 800 22598 787 -498 798 21519 785 -189 796 21828 699 854 710 22871 692 994 703 23011 674 -804 685 2...

result:

ok ok Sum L = 391

Test #7:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

50
600 997 5
-893 -204 3
408 443 1
-560 -748 7
-647 161 6
-285 -980 1
87 -582 7
-48 -721 7
997 285 2
-189 -728 8
525 222 4
-324 816 9
760 317 3
753 -480 10
-813 -921 3
-325 -875 8
-747 816 10
-627 605 7
775 786 6
136 -54 2
274 948 10
216 -113 7
924 68 3
101 576 8
60 -501 2
898 801 8
-767 -974 10
-99...

output:

10
100 997 285 1008 22302 932 -941 943 21076 924 68 935 22085 898 801 909 22818 775 786 786 22803 760 317 771 22334 753 -480 764 21537 600 997 611 23014 558 115 569 22132 525 222 536 22239 492 36 503 22053 408 443 419 22460 326 -644 337 21373 274 948 285 22965 269 -705 280 21312 216 -113 227 21904 1...

result:

ok ok Sum L = 781

Test #8:

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

input:

50
24 -889 49
117 418 49
25 524 44
980 -416 43
-494 357 41
-287 -285 46
151 574 41
-289 68 49
-515 -540 41
-367 -178 47
-887 151 45
197 -272 47
714 724 45
-737 94 49
810 830 47
808 -695 41
537 -637 49
-142 -167 44
-749 -631 47
445 -444 42
801 910 43
59 363 42
-912 466 50
-649 -479 48
-958 -511 49
88...

output:

50
100 980 -416 991 21601 938 -596 949 21421 881 158 892 22175 810 830 821 22847 808 -695 819 21322 801 910 812 22927 714 724 725 22741 537 -637 548 21380 531 -449 542 21568 445 -444 456 21573 273 -830 284 21187 210 944 221 22961 197 -272 208 21745 173 -857 184 21160 151 574 162 22591 139 -450 150 2...

result:

ok ok Sum L = 4768

Test #9:

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

input:

50
151 -171 50
-367 -951 50
808 569 50
150 -618 50
27 -476 50
-846 729 50
549 -456 50
50 646 50
294 -70 50
-571 104 50
128 -265 50
913 -700 50
267 -965 50
896 846 50
-2 713 50
21 679 50
-515 975 50
168 180 50
-369 -98 50
676 115 50
643 -779 50
920 -237 50
-324 450 50
149 -378 50
-882 -602 50
-126 -7...

output:

50
100 945 -250 956 21767 920 -237 931 21780 913 -700 924 21317 896 846 907 22863 895 -564 906 21453 842 452 853 22469 808 569 819 22586 676 115 687 22132 644 701 655 22718 643 -779 654 21238 549 -456 560 21561 498 -636 509 21381 481 -873 492 21144 421 -463 432 21554 417 -944 428 21073 308 229 319 2...

result:

ok ok Sum L = 5000

Test #10:

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

input:

50
4 5 34
1 -5 24
-4 -4 32
-3 3 28
0 -1 21
1 -4 25
0 0 30
0 -4 42
-3 -2 44
-5 -3 37
4 -1 46
5 2 20
2 2 37
-2 5 35
-2 -1 39
2 4 32
-4 -3 42
0 3 32
3 5 47
-4 1 2
5 -1 17
-5 -4 5
-2 2 29
-5 1 11
2 -5 43
4 4 14
-5 0 9
0 -5 17
5 1 27
-3 0 24
-1 4 16
5 0 50
3 -2 18
1 -2 6
2 -1 29
-1 3 38
1 5 36
-3 1 28
-3...

output:

50
100 5 -4 16 22013 5 -1 16 22016 5 0 16 22017 5 1 16 22018 5 2 16 22019 4 -1 15 22016 4 4 15 22021 4 5 15 22022 3 -2 14 22015 3 5 14 22022 2 -5 13 22012 2 -3 13 22014 2 -1 13 22016 2 2 13 22019 2 4 13 22021 1 -5 12 22012 1 -4 12 22013 1 -2 12 22015 1 -1 12 22016 1 5 12 22022 0 -5 11 22012 0 -4 11 ...

result:

ok ok Sum L = 3924

Test #11:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

50
2 0 2
2 -3 2
4 1 2
-3 -3 2
-5 1 2
5 3 2
-5 -3 2
-3 -2 2
2 -1 2
2 3 2
4 4 1
1 -4 1
5 -1 2
-4 1 2
3 -2 1
-1 2 2
5 -5 2
-2 1 2
-5 -1 2
-2 -1 2
-1 -2 2
5 5 1
0 -2 2
1 1 1
2 2 2
3 5 2
-2 -4 1
-3 5 1
4 2 2
-4 -4 2
-3 2 1
5 0 2
-2 -2 2
-4 4 1
-2 5 2
2 5 1
3 -5 2
-4 5 2
-5 5 2
-2 4 2
-5 -5 2
-2 2 2
-3 -4...

output:

2
100 5 -5 16 22012 5 -1 16 22016 5 0 16 22017 5 3 16 22020 5 5 16 22022 4 1 15 22018 4 2 15 22019 4 4 15 22021 3 -5 14 22012 3 -3 14 22014 3 -2 14 22015 3 5 14 22022 2 -4 13 22013 2 -3 13 22014 2 -2 13 22015 2 -1 13 22016 2 0 13 22017 2 2 13 22019 2 3 13 22020 2 5 13 22022 1 -4 12 22013 1 -2 12 220...

result:

ok ok Sum L = 186

Test #12:

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

input:

50
4 3 49
-5 -3 49
0 -3 50
-2 -4 49
-5 -5 50
4 0 49
-1 -2 49
-2 0 49
1 2 50
-1 -5 50
-5 -1 50
-5 5 49
2 0 50
-2 -3 50
-4 -5 50
0 -2 50
-5 4 50
-1 1 49
-1 -4 49
-3 -1 49
1 -3 50
-4 1 50
0 5 50
1 -2 50
-1 5 50
4 2 50
4 -3 49
1 -4 49
-1 -1 49
-3 -5 50
4 -4 50
3 2 49
3 -3 49
0 2 50
-3 -4 49
5 -1 49
-3 5...

output:

50
100 5 -3 16 22014 5 -1 16 22016 5 4 16 22021 4 -4 15 22013 4 -3 15 22014 4 0 15 22017 4 2 15 22019 4 3 15 22020 3 -3 14 22014 3 -1 14 22016 3 2 14 22019 3 5 14 22022 2 -5 13 22012 2 0 13 22017 1 -5 12 22012 1 -4 12 22013 1 -3 12 22014 1 -2 12 22015 1 2 12 22019 1 4 12 22021 0 -4 11 22013 0 -3 11 ...

result:

ok ok Sum L = 4977

Test #13:

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

input:

50
114 514 30
115 514 41
116 514 6
117 514 49
118 514 10
119 514 49
120 514 1
121 514 7
122 514 3
123 514 4
124 514 1
125 514 12
126 514 15
127 514 16
128 514 34
129 514 24
130 514 49
131 514 43
132 514 25
133 514 12
134 514 26
135 514 13
136 514 12
137 514 15
138 514 7
139 514 25
140 514 5
141 514 ...

output:

49
100 163 514 174 22531 162 514 173 22531 161 514 172 22531 160 514 171 22531 159 514 170 22531 158 514 169 22531 157 514 168 22531 156 514 167 22531 155 514 166 22531 154 514 165 22531 153 514 164 22531 152 514 163 22531 151 514 162 22531 150 514 161 22531 149 514 160 22531 148 514 159 22531 147 5...

result:

ok ok Sum L = 3602

Test #14:

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

input:

50
191 981 19
191 980 41
191 979 20
191 978 14
191 977 2
191 976 49
191 975 40
191 974 3
191 973 20
191 972 6
191 971 13
191 970 4
191 969 4
191 968 47
191 967 32
191 966 11
191 965 34
191 964 30
191 963 3
191 962 16
191 961 24
191 960 30
191 959 34
191 958 31
191 957 24
191 956 29
191 955 42
191 95...

output:

49
100 191 932 202 22949 191 933 202 22950 191 934 202 22951 191 935 202 22952 191 936 202 22953 191 937 202 22954 191 938 202 22955 191 939 202 22956 191 940 202 22957 191 941 202 22958 191 942 202 22959 191 943 202 22960 191 944 202 22961 191 945 202 22962 191 946 202 22963 191 947 202 22964 191 9...

result:

ok ok Sum L = 3602

Test #15:

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

input:

50
-123 456 47
-122 457 35
-121 458 25
-120 459 35
-119 460 30
-118 461 33
-117 462 21
-116 463 31
-115 464 21
-114 465 35
-113 466 20
-112 467 17
-111 468 25
-110 469 3
-109 470 29
-108 471 35
-107 472 4
-106 473 44
-105 474 4
-104 475 28
-103 476 49
-102 477 9
-101 478 39
-100 479 9
-99 480 21
-98...

output:

50
100 -74 505 -63 22522 -75 504 -64 22521 -76 503 -65 22520 -77 502 -66 22519 -78 501 -67 22518 -79 500 -68 22517 -80 499 -69 22516 -81 498 -70 22515 -82 497 -71 22514 -83 496 -72 22513 -84 495 -73 22512 -85 494 -74 22511 -86 493 -75 22510 -87 492 -76 22509 -88 491 -77 22508 -89 490 -78 22507 -90 4...

result:

ok ok Sum L = 3706

Test #16:

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

input:

50
321 -525 46
322 -526 14
323 -527 16
324 -528 38
325 -529 22
326 -530 24
327 -531 48
328 -532 5
329 -533 7
330 -534 30
331 -535 25
332 -536 2
333 -537 13
334 -538 1
335 -539 33
336 -540 8
337 -541 9
338 -542 2
339 -543 29
340 -544 17
341 -545 41
342 -546 39
343 -547 9
344 -548 47
345 -549 47
346 -...

output:

50
100 370 -574 381 21443 369 -573 380 21444 368 -572 379 21445 367 -571 378 21446 366 -570 377 21447 365 -569 376 21448 364 -568 375 21449 363 -567 374 21450 362 -566 373 21451 361 -565 372 21452 360 -564 371 21453 359 -563 370 21454 358 -562 369 21455 357 -561 368 21456 356 -560 367 21457 355 -559...

result:

ok ok Sum L = 3712

Test #17:

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

input:

50
-444 -555 23
-445 -556 32
-446 -557 36
-447 -558 29
-448 -559 4
-449 -560 25
-450 -561 29
-451 -562 5
-452 -563 9
-453 -564 28
-454 -565 35
-455 -566 26
-456 -567 22
-457 -568 39
-458 -569 13
-459 -570 50
-460 -571 37
-461 -572 14
-462 -573 26
-463 -574 49
-464 -575 23
-465 -576 44
-466 -577 2
-4...

output:

50
100 -444 -555 -433 21462 -445 -556 -434 21461 -446 -557 -435 21460 -447 -558 -436 21459 -448 -559 -437 21458 -449 -560 -438 21457 -450 -561 -439 21456 -451 -562 -440 21455 -452 -563 -441 21454 -453 -564 -442 21453 -454 -565 -443 21452 -455 -566 -444 21451 -456 -567 -445 21450 -457 -568 -446 21449...

result:

ok ok Sum L = 3661

Test #18:

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

input:

50
-142 0 48
-143 1 22
-144 2 45
-145 3 9
-146 4 36
-147 5 46
-148 6 26
-149 7 26
-150 8 9
-151 9 19
-152 10 22
-153 11 14
-154 12 8
-155 13 20
-156 14 41
-157 15 47
-158 16 22
-159 17 50
-160 18 3
-161 19 12
-162 20 15
-163 21 32
-164 22 46
-165 23 45
-166 24 3
-167 25 27
-168 26 33
-169 27 17
-170...

output:

50
100 -142 0 -131 22017 -143 1 -132 22018 -144 2 -133 22019 -145 3 -134 22020 -146 4 -135 22021 -147 5 -136 22022 -148 6 -137 22023 -149 7 -138 22024 -150 8 -139 22025 -151 9 -140 22026 -152 10 -141 22027 -153 11 -142 22028 -154 12 -143 22029 -155 13 -144 22030 -156 14 -145 22031 -157 15 -146 22032...

result:

ok ok Sum L = 3811

Test #19:

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

input:

12
1000 1000 50
1000 -1000 50
1000 999 50
999 1000 50
999 -1000 50
-999 1000 50
1000 -999 50
-999 -1000 50
-1000 1000 50
-1000 -1000 50
-1000 -999 50
-1000 999 50

output:

50
24 1000 -1000 1011 21017 1000 -999 1011 21018 1000 999 1011 23016 1000 1000 1011 23017 999 -1000 1010 21017 999 1000 1010 23017 -999 -1000 -988 21017 -999 1000 -988 23017 -1000 -1000 -989 21017 -1000 -999 -989 21018 -1000 999 -989 23016 -1000 1000 -989 23017
24 1000 -1000 1017 33026 1000 -999 101...

result:

ok ok Sum L = 1200

Test #20:

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

input:

4
1000 1000 50
1000 -1000 50
-1000 1000 50
-1000 -1000 50

output:

50
8 1000 -1000 1011 21017 1000 1000 1011 23017 -1000 -1000 -989 21017 -1000 1000 -989 23017
8 1000 -1000 1017 33026 1000 1000 1017 35026 -1000 -1000 -983 33026 -1000 1000 -983 35026
8 1000 -1000 1023 45035 1000 1000 1023 47035 -1000 -1000 -977 45035 -1000 1000 -977 47035
8 1000 -1000 1029 57044 100...

result:

ok ok Sum L = 400

Extra Test:

score: 0
Extra Test Passed