QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#118580#1406. Constellation 2GuanYunchang100 ✓754ms38916kbC++204.2kb2023-07-03 17:47:392023-07-03 17:47:41

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 1ms
memory: 3552kb

input:

6
3 0 0
-3 0 1
2 1 2
-2 -1 0
1 -2 1
-1 2 2

output:

1

result:

ok single line: '1'

Test #2:

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

input:

8
490 -2722 1
-1006 1837 2
4140 -2652 0
-3720 1186 1
502 -340 1
-700 -623 1
-1289 -1662 1
-3959 1341 2

output:

0

result:

ok single line: '0'

Test #3:

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

input:

12
-3337 2384 1
-4200 -1661 2
4076 1314 0
-2184 -1784 0
-4656 -126 1
3423 1239 0
3277 649 2
-2718 -1293 2
-1850 315 1
-481 -3606 1
-3771 -2490 2
1215 -4715 2

output:

227

result:

ok single line: '227'

Test #4:

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

input:

12
2 1 0
11 1 1
5 8 2
4 2 0
9 2 1
8 8 2
1 3 0
12 3 1
5 11 2
3 4 0
10 4 1
8 11 2

output:

0

result:

ok single line: '0'

Test #5:

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

input:

20
-1264 -1781 1
-3969 4667 1
-2760 -1328 0
-3165 -315 2
844 739 1
4236 3943 2
157 -3913 0
-591 389 1
-4337 1726 0
-10 1631 0
-4531 4449 1
615 612 2
818 2515 0
-708 631 2
4462 -3331 0
2617 -4657 2
-1984 -3878 0
4763 -1190 1
-2930 -2952 2
-3752 -4915 0

output:

10469

result:

ok single line: '10469'

Test #6:

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

input:

25
-4772 428 0
3094 -4845 2
-364 2839 1
3795 -3519 2
1219 4507 0
-164 -300 1
-4214 -3845 1
-1026 136 2
-1767 655 0
-4480 3517 2
-547 4708 1
-33 -3165 0
2197 -869 0
1909 2183 1
-4484 -254 2
-3628 -2965 0
2358 -3510 0
3377 288 1
1457 -2045 2
-1885 -1604 1
-561 -2892 0
3601 1562 1
-2763 2208 2
4393 306...

output:

41002

result:

ok single line: '41002'

Test #7:

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

input:

30
1906 4056 1
-589 -27 1
-349 1954 0
-2930 -746 0
-529 -2840 1
2950 -2799 0
-2581 -1848 1
2646 -2220 2
2051 -751 1
-4148 -4506 1
1131 1302 2
-185 -970 0
4685 4836 1
2617 -4908 1
-3180 4945 2
461 55 0
4339 -2812 0
3384 -2418 2
561 2241 2
4498 1072 2
-2947 3765 1
3863 3263 2
76 3943 0
1277 -4076 1
-2...

output:

103921

result:

ok single line: '103921'

Test #8:

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

input:

30
-30160 -39350 1
27940 6260 1
-13690 -36610 0
34860 -14330 2
-29660 -46120 2
-21480 4840 2
10930 -9630 2
-38790 27040 1
29340 38480 0
32260 46580 2
21590 -3270 0
-12600 23860 2
-43910 20400 0
28340 38930 2
-13470 -44690 1
-20680 -18210 0
13910 39190 2
12180 -35480 0
15830 -43300 0
-4690 49140 2
14...

output:

70584

result:

ok single line: '70584'

Test #9:

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

input:

30
-3587 -3641 0
2721 -2001 1
4510 -3260 1
-999 1136 1
395 -777 1
3383 -4995 2
-1139 -4071 0
2942 2830 2
-1755 2670 2
4066 -1804 0
4832 -1771 0
98 3169 2
1204 2784 1
513 2191 1
-3828 -1067 1
-874 3428 0
-4017 -202 1
-340 -2001 0
-3805 -530 1
4112 -2798 1
299 1467 2
3763 4091 1
-4929 972 1
3430 3950 ...

output:

86713

result:

ok single line: '86713'

Test #10:

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

input:

25
97448 13125 1
-19694 -5691 1
-73085 26421 1
61829 -92699 0
37176 -51303 0
-80008 -33520 0
-46522 -26274 2
50935 -481 2
-55746 -49463 0
78094 55267 2
-74794 28478 0
6421 66684 2
-68690 65043 0
-98870 31154 1
88231 -70701 1
-4545 3019 2
21040 59770 1
-74231 -76908 0
-19278 -26570 0
-94737 -50513 1
...

output:

36584

result:

ok single line: '36584'

Test #11:

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

input:

30
28958 2905 2
19819 10019 1
-95904 102 2
19012 18811 0
-4902 8992 2
-1001 -94094 1
19991 -49943 2
9295 -3994 0
49029 22919 1
19922 1224 2
77777 -7772 0
19191 29113 2
91489 32423 2
18188 44294 0
-49854 89113 2
28982 77273 0
8818 -775 1
99584 99946 2
98828 28582 2
99185 -15827 1
8838 -9919 2
-9491 7...

output:

102309

result:

ok single line: '102309'

Test #12:

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

input:

30
15 39400 1
23 73402 1
10 -21169 1
-22 40220 2
-22 86769 0
-20 56152 0
-19 -69858 2
19 -33387 1
10 -25995 2
8 9297 1
-2 -96476 0
7 -59818 0
-18 -81517 2
22 -61070 1
-20 75418 2
-28 67860 0
23 -82315 1
-4 -83737 0
-7 -44346 0
19 85087 1
-19 45561 2
20 27196 2
-4 -14281 2
-14 -32413 1
29 -22603 1
9 ...

output:

103681

result:

ok single line: '103681'

Subtask #2:

score: 40
Accepted

Dependency #1:

100%
Accepted

Test #13:

score: 40
Accepted
time: 1ms
memory: 3732kb

input:

50
-4918 -1597 2
1140 3398 0
1948 -448 1
909 -243 1
3646 -621 1
2921 -493 1
-4548 -2057 2
1920 -1096 1
2634 -2831 1
-2222 -2545 2
-487 1814 0
-4609 -2483 2
927 -844 1
-1306 -239 2
-3584 -3321 2
-1972 -2502 2
3304 -1261 1
-1730 -2333 2
2937 -958 1
-107 3504 0
3674 -3222 1
-2139 -2077 2
-3531 -4259 2
...

output:

0

result:

ok single line: '0'

Test #14:

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

input:

50
3683 2272 0
3497 1720 2
-1206 -3812 2
1470 -2779 1
-2152 -4793 2
225 -59 0
-670 -32 0
-628 -4327 0
-1409 1028 2
1257 -3028 2
3227 -3770 0
466 -2379 2
-258 -2064 0
-4135 -3924 2
-2978 -3953 1
-2820 -4025 2
-2465 1836 1
3106 -4538 1
-3129 -1332 1
-3268 702 1
4237 -4233 1
-3907 3806 2
-64 -2872 2
42...

output:

3138448

result:

ok single line: '3138448'

Test #15:

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

input:

100
2843 4347 0
21 2387 1
-2772 2126 0
732 -4753 0
-4526 -4686 2
-4650 -2145 1
3711 -4780 2
-4735 3137 0
475 -3988 2
3791 279 1
-2149 -4212 1
-2733 -1165 2
-3346 1147 1
-1699 1295 0
-3937 4430 1
3901 3085 0
3933 -3418 1
3145 308 2
566 2321 2
-1944 4515 2
3877 -4428 1
-4359 3487 1
-1213 2930 0
-3544 ...

output:

211755645

result:

ok single line: '211755645'

Test #16:

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

input:

150
-2851 3302 1
-3954 2698 0
-927 -2034 2
1674 -3545 0
-2060 -2270 2
-2449 646 1
1567 648 2
4313 4023 0
-3790 2993 2
376 3440 2
3210 -1462 0
-4849 133 0
-747 -1568 2
-1423 2016 2
3857 -3913 1
4965 4206 1
-4197 2981 0
1238 -4271 2
2917 1671 2
-3122 4412 2
-4644 -1553 2
-1746 2468 1
-3431 -2772 1
117...

output:

2634139642

result:

ok single line: '2634139642'

Test #17:

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

input:

200
3096 -949 2
-389 -3152 1
-3243 3244 1
-3263 -4366 0
1088 -2577 0
2020 -1565 1
-3121 -3405 1
-4382 -3723 2
-2854 1704 1
4706 -2990 1
-3655 1134 1
-341 3562 0
-4150 3034 1
4994 -1976 0
3959 348 0
-1321 1861 2
-614 3096 1
3751 -3006 0
-2030 266 0
3415 -2206 2
-3063 651 0
-4979 611 0
-4835 4055 2
-3...

output:

14774766504

result:

ok single line: '14774766504'

Test #18:

score: 0
Accepted
time: 7ms
memory: 7956kb

input:

300
2552 857 0
-4351 -3603 1
-217 3477 0
-2677 -112 0
-4819 -577 2
-513 -2738 1
-4094 -3073 0
870 -4161 0
3134 -3316 2
-807 -4566 2
-3813 2708 0
3082 2561 0
-3180 -1286 0
-936 -1120 1
-301 1391 1
3895 -2502 2
1937 -575 2
-4099 -4568 2
-3987 3852 2
-4638 2267 0
256 1614 0
-4625 -4017 0
-3603 -2279 0
...

output:

165343086994

result:

ok single line: '165343086994'

Test #19:

score: 0
Accepted
time: 7ms
memory: 6524kb

input:

300
3008 3910 2
-52 4878 1
4950 131 2
3551 3957 2
-696 4652 1
807 -2792 1
-1418 3755 0
-2692 4305 2
3805 -1177 1
-4512 -2234 2
-383 431 0
-4539 436 0
2548 1592 1
-4404 2909 2
-2070 3571 2
-205 -2152 0
2408 2847 1
52 195 1
-3478 -3786 2
362 2338 0
-4712 4467 0
3200 -233 0
-3403 784 2
3527 2612 1
228 ...

output:

172899220329

result:

ok single line: '172899220329'

Test #20:

score: 0
Accepted
time: 8ms
memory: 7748kb

input:

300
440 -129 1
-2461 3427 0
-990 1506 0
1806 2129 1
-3990 -3964 0
-4905 642 0
-2804 4821 1
-3610 2367 1
941 775 1
-952 4449 1
-1342 -1076 0
3600 -804 0
-3932 -3308 0
-2096 1453 1
1879 3139 1
-3548 3207 1
-2121 1265 1
1211 -4525 0
-4577 4528 1
1347 3711 1
3821 1821 0
-3871 -4337 0
3057 289 1
3637 -35...

output:

0

result:

ok single line: '0'

Test #21:

score: 0
Accepted
time: 8ms
memory: 8128kb

input:

300
-2935 -4608 0
4994 1632 1
-3387 -1379 1
-1827 -501 1
4228 -126 1
729 -530 1
-2002 698 1
-66 1373 1
-2168 2393 2
-819 -4851 0
-566 -4073 0
433 -4913 0
2595 -3876 0
-1078 -1404 1
-3217 -3796 0
-2481 -231 1
-2305 3881 2
-1792 929 1
-577 -3804 0
2930 1636 1
368 3710 2
70 4459 2
4982 -3008 0
2379 322...

output:

92525238913

result:

ok single line: '92525238913'

Test #22:

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

input:

250
84878 14102 0
92967 -71309 0
71379 34133 0
66421 8630 2
-58441 77507 0
62842 -80236 1
75050 40560 1
72095 68282 0
-95456 -48461 0
45570 35417 2
88370 -57015 2
-48596 -80021 1
77428 -53973 2
-939 -38039 2
13192 -90963 1
-21516 41407 1
-91649 -45038 2
4005 79492 0
-15371 24055 1
-54341 59283 2
-64...

output:

55494967078

result:

ok single line: '55494967078'

Test #23:

score: 0
Accepted
time: 7ms
memory: 7828kb

input:

300
20899 12657 2
-21852 35016 0
-5789 -74395 0
2303 77001 0
-32977 64376 0
-52325 -28265 2
-44520 -57221 2
-9088 -72391 2
-39107 8286 2
-88707 -1416 1
-82771 -47749 1
35110 -69210 2
-45758 -61255 0
63279 -55006 2
-75589 -18385 1
-49216 -79584 1
72681 61998 0
-45288 21264 1
-63684 -66895 1
-4640 202...

output:

173331231438

result:

ok single line: '173331231438'

Test #24:

score: 0
Accepted
time: 7ms
memory: 7556kb

input:

300
-43 56148 1
-58 12503 0
28 11258 0
-8 80638 1
-43 -774 2
48 15591 2
-16 -2475 2
-62 -30957 1
-7 17311 1
7 -50683 1
-7 27420 0
-65 -34392 2
0 4220 1
2 35296 0
9 -38547 0
57 14977 0
-8 -38116 1
58 -12795 2
-4 -15197 0
39 33890 0
33 -64558 0
1 45289 2
39 10431 2
-89 8577 1
88 7293 1
-67 32129 0
14 ...

output:

172633449852

result:

ok single line: '172633449852'

Subtask #3:

score: 45
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #25:

score: 45
Accepted
time: 49ms
memory: 14408kb

input:

800
866 -1407 1
-4984 2925 0
-3813 -2560 0
-1864 678 1
2023 -4766 1
4482 -1325 1
2642 2008 0
4490 1534 2
1900 4733 2
-1629 -744 2
-2707 -408 1
-4563 3821 1
3431 -2175 2
-1022 3321 2
-913 -400 1
4158 -351 1
-3875 -4091 1
-1061 -2175 0
1046 869 2
2239 -733 2
2416 2148 2
783 4543 1
3228 896 2
4602 3740...

output:

64070842644359

result:

ok single line: '64070842644359'

Test #26:

score: 0
Accepted
time: 59ms
memory: 16160kb

input:

900
2008 -258 1
-3347 1289 0
3908 518 0
3931 -4176 0
-1831 4718 0
-1380 -2385 0
-4931 -3442 0
130 2837 0
3335 -4849 0
-993 222 1
4757 182 0
607 -4856 0
-3899 -1833 0
1405 4486 0
3015 -3674 0
1485 -495 1
-4189 4473 0
2231 -4515 0
591 1323 1
-740 1367 1
-4259 -477 0
-3175 2222 0
-430 4292 0
4489 -1236...

output:

241757706038

result:

ok single line: '241757706038'

Test #27:

score: 0
Accepted
time: 75ms
memory: 15056kb

input:

1000
1916 2184 2
556 -1964 2
4116 -1112 1
-1853 1627 0
-3490 -3906 1
2919 -942 2
1270 -4508 1
-1503 -1693 1
3298 1208 2
-3533 -1912 2
-274 3922 2
-759 4348 2
-996 -4997 0
2321 2019 2
-215 -2622 2
-768 1961 1
-1739 2387 1
472 986 2
4823 4183 0
339 -3095 0
4023 -1182 1
4780 1822 2
4588 -4442 2
3119 -3...

output:

246607652934798

result:

ok single line: '246607652934798'

Test #28:

score: 0
Accepted
time: 76ms
memory: 16756kb

input:

1000
3253 553 1
-3548 -4739 0
-780 -2840 0
85 -612 1
-1705 1821 0
-4260 -497 1
-223 361 1
-4659 2818 2
4126 -2924 1
3542 4064 1
-934 2035 2
-2001 -3007 2
1849 -2669 2
3853 -1907 2
-395 -2260 1
4821 -1108 1
2791 -2571 2
3513 -4963 0
-572 797 1
-2648 1740 1
-2796 2061 0
1620 -4247 2
-2539 -554 1
1725 ...

output:

239894689446924

result:

ok single line: '239894689446924'

Test #29:

score: 0
Accepted
time: 174ms
memory: 22640kb

input:

1500
3871 2172 0
-460 -244 0
-4891 -2990 2
-3360 1652 0
-3118 -804 1
-286 -3114 2
4388 4074 0
1596 4576 0
4367 -4624 1
-631 -4272 2
-549 231 2
-2449 4522 2
-770 202 0
4025 3433 2
184 -1023 0
-3590 -991 2
-3369 -3408 2
1044 3258 1
-1047 -4687 2
3525 2403 1
-1013 2566 0
-3332 -3986 2
4601 -659 0
725 -...

output:

2808390456349539

result:

ok single line: '2808390456349539'

Test #30:

score: 0
Accepted
time: 309ms
memory: 28216kb

input:

2000
2106 263 1
721 -4386 0
-1372 2239 2
3134 1674 1
212 -854 0
2799 1035 1
3789 284 1
4604 3067 1
2343 -4753 0
-1270 553 2
3418 4077 1
-3178 642 2
4576 73 1
53 -4220 0
-2588 4823 2
-4998 4693 2
2467 1896 1
4080 4381 1
-4913 1398 2
-1033 -3530 0
-3775 330 2
955 300 1
3008 835 1
-3630 2191 2
3768 227...

output:

0

result:

ok single line: '0'

Test #31:

score: 0
Accepted
time: 488ms
memory: 33904kb

input:

2500
31411 -93231 0
89643 -60996 0
87553 63978 0
-46535 96546 2
-66598 -22469 2
-61301 -68410 0
-70666 85926 0
-25005 -74538 1
-53993 60310 1
-88469 52714 1
15383 82397 1
91186 84171 1
51852 -29686 0
-81628 -26212 0
-81226 -84942 2
-74483 65539 1
71141 -99621 1
11391 -14380 0
44941 71475 1
-73399 71...

output:

60345930670496824

result:

ok single line: '60345930670496824'

Test #32:

score: 0
Accepted
time: 725ms
memory: 38916kb

input:

3000
76511 -42462 1
-66309 -58832 2
-24313 -7060 2
95037 -68683 1
-42159 52375 1
-76468 -33473 2
-40223 -5462 2
-2377 89307 0
-64467 -97069 2
99627 -93734 1
-19408 -66730 0
31587 88821 0
3829 53602 0
8771 -50975 0
-5802 -38715 0
88348 -34968 1
63739 -94425 1
32431 -94501 0
37927 -38508 1
51615 -6483...

output:

156691672596908561

result:

ok single line: '156691672596908561'

Test #33:

score: 0
Accepted
time: 730ms
memory: 38800kb

input:

3000
-47094 -55887 2
-75112 -58906 2
36311 -32807 0
-7790 84737 2
49488 -95062 0
99923 -21029 0
-80570 -42621 2
27398 57772 2
-29272 86013 0
-91464 -73721 2
85421 19003 2
-26596 -67026 2
-95043 46244 2
47325 82786 2
58253 20751 0
-61846 92597 2
-46066 29603 0
55110 -2760 2
61560 -11137 2
-3186 -9065...

output:

181264493659792960

result:

ok single line: '181264493659792960'

Test #34:

score: 0
Accepted
time: 746ms
memory: 38812kb

input:

3000
-80 -56733 0
-531 31118 2
9 60852 0
-494 -6069 2
20 55268 1
-85 41820 2
-306 -39981 0
-634 -5549 2
211 -20557 0
-105 -42759 0
-314 -29469 0
-46 -15755 1
233 29501 2
-498 14233 2
-210 -24805 0
-407 18958 0
177 29434 0
495 -19378 0
170 -30122 2
-41 6426 1
114 75383 2
197 25658 1
-460 -36539 2
507...

output:

177829777519109240

result:

ok single line: '177829777519109240'

Test #35:

score: 0
Accepted
time: 740ms
memory: 38816kb

input:

3000
-75851 38061 0
70780 8510 0
28682 -33273 1
-12979 6732 1
41903 -50081 1
-23176 52316 2
93638 -86516 2
44776 -79442 1
48462 -51014 1
67802 -89803 0
54678 -17618 2
-32117 44687 2
97996 -49097 1
-37016 23184 2
75461 64481 1
47864 29530 1
-94282 88009 2
-71793 -14174 2
57325 -33136 2
18149 21424 2
...

output:

181126994535408733

result:

ok single line: '181126994535408733'

Test #36:

score: 0
Accepted
time: 754ms
memory: 38804kb

input:

3000
-27377 -52898 2
-89235 -9922 2
91139 -84525 1
18876 52757 0
-70572 -51127 2
-54727 -51811 2
-13866 97307 0
-88012 -4084 2
60728 -77322 1
59262 -22141 1
52453 -35344 1
-93666 -74749 2
-54689 -53818 2
96720 -81005 1
-84233 -36696 2
72026 -34026 1
-16618 -17367 2
74025 -94759 1
99327 -45830 1
-176...

output:

0

result:

ok single line: '0'

Test #37:

score: 0
Accepted
time: 740ms
memory: 38800kb

input:

3000
-14454 -6766 1
74851 -40784 2
-7697 63781 0
-7021 27346 1
-42250 56730 0
26760 79800 0
82694 -93746 2
-25061 -9347 1
-89389 -73351 2
-47558 -99847 2
80492 71660 0
80446 -51001 2
-70617 40681 0
46145 -52859 2
3191 -35127 2
-36686 -26675 1
-2145 -2808 1
97907 1701 1
-24566 12707 1
-52536 -80231 2...

output:

98316106014634069

result:

ok single line: '98316106014634069'

Test #38:

score: 0
Accepted
time: 734ms
memory: 38784kb

input:

3000
-64117 35418 2
-67742 60410 1
79377 -54047 0
-44689 -13241 0
48287 16013 0
36027 -24143 0
3170 33568 2
14880 -75847 0
-46474 -81928 0
-11801 84360 2
54003 25572 0
4931 -8134 1
-40966 -69732 1
43394 -31737 2
-25987 45810 0
-20859 85529 2
-92902 -34122 1
25505 13446 2
62715 -31028 2
-81463 47342 ...

output:

179635454977032081

result:

ok single line: '179635454977032081'

Test #39:

score: 0
Accepted
time: 738ms
memory: 38800kb

input:

3000
4004 2980 0
-11039 -12055 1
-92659 -92657 2
38948 38615 1
19387 18922 2
-16101 -16044 0
51443 51214 0
76806 76496 1
49796 50077 0
-16859 -15999 1
51803 51773 2
12397 11192 2
22495 21660 0
-2088 -1290 1
37412 37543 1
2724 3000 0
4400 3709 2
-8272 -9532 2
-59840 -60007 2
17047 18117 2
-7507 -6390...

output:

179677695001663172

result:

ok single line: '179677695001663172'

Test #40:

score: 0
Accepted
time: 751ms
memory: 38744kb

input:

3000
3812 -31518 1
66007 -21229 2
-97353 -12661 0
-83426 -14852 0
-13504 -8166 1
-3380 -30020 1
-66792 6358 0
67656 23662 2
-63082 -27605 0
19501 -13547 1
-66133 7046 0
37726 37703 2
64702 3040 2
50645 36373 2
-52062 21453 0
13892 -20640 1
-39454 37687 0
-3851 28201 1
-85738 -34472 0
-56202 11535 0
...

output:

97153035338129243

result:

ok single line: '97153035338129243'

Extra Test:

score: 0
Extra Test Passed