QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#356360#1087. Brief Statements UnionwaifuSenpai#AC ✓5245ms280456kbC++233.6kb2024-03-17 18:07:332024-03-17 18:07:34

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 4ms
memory: 11824kb

input:

4 3
1 2 1
2 4 3
2 2 1

output:

011

result:

ok "011"

Test #2:

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

input:

4 3
1 2 1
3 4 3
2 3 1

output:

111

result:

ok "111"

Test #3:

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

input:

8 8
1 3 23
2 8 8
2 4 10
3 3 26
1 3 26
1 4 10
4 7 8
4 5 40

output:

10000000

result:

ok "10000000"

Test #4:

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

input:

8 8
3 5 9
3 3 63
6 7 57
1 4 44
5 5 63
1 7 40
1 7 40
7 8 0

output:

10000000

result:

ok "10000000"

Test #5:

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

input:

8 8
3 8 21
6 8 4
1 7 20
1 7 20
6 6 61
4 6 29
2 2 31
5 6 61

output:

11000000

result:

ok "11000000"

Test #6:

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

input:

8 8
7 8 21
2 6 26
3 3 63
4 5 58
1 1 55
2 8 10
3 3 63
2 8 10

output:

10000000

result:

ok "10000000"

Test #7:

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

input:

8 8
6 7 21
7 8 59
5 8 43
7 7 63
3 5 45
1 1 31
3 6 45
2 3 61

output:

10000000

result:

ok "10000000"

Test #8:

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

input:

8 8
2 8 2
2 8 4
6 6 14
4 8 4
6 8 4
3 3 31
5 7 12
4 4 13

output:

10000000

result:

ok "10000000"

Test #9:

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

input:

8 8
1 8 12
3 6 36
1 5 36
3 8 4
7 8 6
3 4 47
1 3 45
1 4 45

output:

10000000

result:

ok "10000000"

Test #10:

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

input:

8 8
3 6 10
3 8 2
1 6 8
3 4 42
1 4 8
4 7 2
3 8 2
4 6 10

output:

11111111

result:

ok "11111111"

Test #11:

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

input:

8 8
3 5 31
4 4 63
3 4 60
3 8 24
4 6 27
4 8 25
3 5 24
4 5 27

output:

10000000

result:

ok "10000000"

Test #12:

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

input:

1000 1000
300 351 21
10 222 0
340 955 0
732 959 0
183 259 1075924053
576 785 809566210
165 668 65600
603 998 0
33 724 0
521 886 809566208
26 48 16512
210 603 1075905600
182 499 1075907648
106 867 65536
380 902 268500992
419 826 268500992
70 824 0
396 898 268500992
175 597 1075905600
407 565 14117162...

output:

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "100000000000000000000000000000...0000000000000000000000000000000"

Test #13:

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

input:

1000 1000
332 333 3888728191
555 691 3691878688
734 782 2617286016
418 815 67110912
173 504 67108868
507 891 67112960
22 256 16384
566 918 67141888
163 904 67108864
377 792 2214594560
342 947 67108864
154 163 117456900
310 727 3288860672
340 957 67108864
209 712 1140852736
235 942 67108864
233 666 1...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #14:

score: 0
Accepted
time: 6ms
memory: 13936kb

input:

1000 1000
142 143 1391808798
442 443 3993194233
508 606 4470796
384 610 4458504
457 757 262144
413 562 138680328
381 480 138709000
554 684 17041414
130 538 0
514 648 4466692
9 560 0
164 293 32784
27 203 0
273 289 172001304
425 559 138680328
704 786 1359216806
116 657 0
52 74 32768
90 172 33808
206 7...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #15:

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

input:

1000 1000
133 134 3452617219
201 202 2741198289
133 688 536888320
46 846 16384
391 490 2785605216
14 351 1024
368 394 2986997344
33 729 17408
670 876 2751480353
130 990 0
85 221 19456
72 470 17408
352 534 2718488160
169 881 536887296
39 255 17408
6 924 0
427 774 2751485472
773 903 603996705
79 960 0...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #16:

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

input:

1000 1000
563 564 3235557804
498 499 136916311
364 731 16418
144 398 67108992
802 987 256
520 822 4194306
281 945 0
229 572 67125248
106 824 0
335 965 0
363 508 69357798
277 814 2
139 807 0
156 269 69339272
231 241 77744264
332 584 67129442
81 239 75497472
18 346 0
437 892 4194306
239 475 69353606
3...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #17:

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

input:

1000 1000
98 99 3669167333
790 791 956876477
343 632 3244556840
392 603 3244565032
318 974 32
272 867 32
762 870 301991968
139 322 327680
448 909 32
69 141 458752
690 995 0
144 972 0
173 693 0
56 710 0
125 212 458752
595 867 301991968
177 535 327712
659 883 301991968
438 907 32
588 745 1398810656
17...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #18:

score: 0
Accepted
time: 1646ms
memory: 129972kb

input:

500000 500000
112503 445152 290559777004655366
32132 117020 290763651042771008
49650 165976 290838417837654336
19883 286024 288230376252375104
155602 273108 309101940228948754
45571 295214 290838417837654080
89127 249224 290839048661046016
413483 486365 470634966683172899
190343 249645 8675616599611...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #19:

score: 0
Accepted
time: 926ms
memory: 60692kb

input:

500000 500000
75169 288105 0
382727 475600 0
10070 425092 0
64304 142056 0
19654 478193 0
154145 161566 0
346669 416663 0
175647 177331 0
116954 294672 0
195952 386106 0
265651 301401 0
39676 49893 0
13856 393740 0
173755 427620 0
365279 394564 0
351657 419756 0
169294 292129 0
167444 280894 0
24498...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #20:

score: 0
Accepted
time: 1065ms
memory: 70404kb

input:

500000 500000
373654 463450 0
2288 373850 0
68537 364733 0
220497 301569 0
233360 271029 0
196331 369245 0
277072 294501 0
196758 439605 0
5647 156687 0
100750 485949 0
137188 139270 0
355904 482855 0
117068 193167 0
206543 388028 0
81337 87211 0
98524 343560 0
10671 167962 0
127988 465299 0
25381 2...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #21:

score: 0
Accepted
time: 903ms
memory: 59708kb

input:

500000 500000
11095 351949 0
278585 444280 0
490010 498933 0
255561 451332 0
84622 307349 0
380382 487995 0
47595 300674 0
81307 201870 0
243577 403713 0
37479 254903 0
198478 372282 0
97747 351969 0
178974 307850 0
293359 416365 0
341581 450799 0
30713 183921 0
90010 147572 0
390721 493917 0
300885...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #22:

score: 0
Accepted
time: 838ms
memory: 47896kb

input:

500000 500000
146813 246458 0
438197 442802 0
186390 491283 0
84702 394907 0
74663 424893 0
398425 421484 0
127352 236823 0
61502 363646 0
264233 308863 0
259358 472290 0
417882 487120 0
240131 498254 0
16288 356989 0
21931 171321 0
174800 254033 0
261438 363540 0
56078 96580 0
84438 194661 0
204056...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #23:

score: 0
Accepted
time: 814ms
memory: 48892kb

input:

500000 500000
226340 257847 0
179020 297992 0
129455 470384 0
102536 347089 0
219149 245284 0
69499 188530 0
140692 170376 0
147989 440056 0
287417 470635 0
61233 340537 0
150717 382959 0
334754 338360 0
83989 280409 0
193066 412120 0
106236 296823 0
27607 452144 0
286700 417164 0
432594 454680 0
21...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #24:

score: 0
Accepted
time: 1586ms
memory: 132612kb

input:

500000 500000
245821 402968 318237459343272090
239475 335449 318237459343272090
201647 261755 894698229359765658
69489 291083 3239161289068546
296508 378281 107685393287145966
121631 280846 606448850007093266
2957 445146 6597103321088
363147 399775 215806178274338156
301744 475261 107684843531332078...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #25:

score: 0
Accepted
time: 3353ms
memory: 244236kb

input:

1000000 1000000
169245 970463 9711119030223872
173623 240926 9711119030223872
169863 443120 9711119030223872
73650 233288 9570149479219216
43421 194133 9007199523700736
195430 317797 9711119097332736
222411 388643 9746307782214656
243872 942108 9746308319085568
533344 747444 170376970696028578
22799...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #26:

score: 0
Accepted
time: 3499ms
memory: 257236kb

input:

1000000 1000000
532317 838776 474348148745316833
590928 987824 474349815192627619
273379 553105 293222170848014432
511545 557073 492362547324005344
453892 779198 492362547324266848
718186 862028 435761285847861665
48992 812242 4785074637676544
669081 988902 433509487107918243
512902 759755 492362547...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #27:

score: 0
Accepted
time: 3360ms
memory: 256380kb

input:

1000000 1000000
109285 873253 654495979009
347327 957232 435490973769670283
422557 806298 436687233360993962
168915 605288 884662247495297
589306 792879 40530442818786874
365320 875539 435490973769670282
951363 973884 17626847776768
156218 650537 884662247495297
365795 615989 435490973769670282
6012...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #28:

score: 0
Accepted
time: 3418ms
memory: 260584kb

input:

1000000 1000000
34259 71661 299213194280960
444365 664789 402289676984571604
469819 953501 411437613723481812
572283 661540 123202564647384980
824088 993396 220258588412683936
783953 993058 220258588421072548
94909 809174 288530139101806668
722765 898720 229318564227655348
436581 773669 402289676984...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #29:

score: 0
Accepted
time: 3352ms
memory: 246296kb

input:

1000000 1000000
525669 950008 228237210548105717
117915 598138 39441822860448138
544826 961721 228519235280630261
751891 821861 525451120129144272
19212 684564 2286984185778176
533536 883577 228237760303919605
864954 980770 72765963264615808
290191 364576 255175386755757039
58560 90460 3831592294705...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok "000000000000000000000000000000...0000000000000000000000000000000"

Test #30:

score: 0
Accepted
time: 1761ms
memory: 90524kb

input:

1000000 1000000
234282 631440 0
505684 747353 0
63071 830951 0
76911 223881 0
708870 900497 0
380993 694360 0
414682 452851 0
357361 380647 0
314477 332030 0
251070 748555 0
81844 848809 0
75707 385688 0
685687 900292 0
144854 226034 0
147526 396993 0
614299 817696 0
3272 495832 0
552116 947129 0
15...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok "111111111111111111111111111111...1111111111111111111111111111111"

Test #31:

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

input:

1 1
1 1 1234567890

output:

1

result:

ok "1"

Test #32:

score: 0
Accepted
time: 524ms
memory: 39268kb

input:

1000000 1
1 1000000 531765139571

output:

1

result:

ok "1"

Test #33:

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

input:

1 2
1 1 1
1 1 42

output:

11

result:

ok "11"

Test #34:

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

input:

1 3
1 1 1
1 1 2
1 1 1

output:

010

result:

ok "010"

Test #35:

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

input:

1 4
1 1 1
1 1 2
1 1 1
1 1 2

output:

0000

result:

ok "0000"

Test #36:

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

input:

1 3
1 1 1
1 1 2
1 1 3

output:

000

result:

ok "000"

Test #37:

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

input:

3 4
1 2 1
1 3 2
2 3 3
1 3 1

output:

0100

result:

ok "0100"

Test #38:

score: 0
Accepted
time: 5245ms
memory: 247612kb

input:

1000000 1000000
205349 205349 172825635700342783
690050 891114 172825635700342783
127927 127927 172825635700342783
6419 88225 172825635700342783
658826 666830 172825635700342783
383751 383751 172825635700342783
357661 357661 172825635700342783
391 25934 172825635700342783
509279 509279 1728256357003...

output:

101001101101001011111010100110010111101101000011010011001011010101100111010001010101000001000010100011111110001000100010010011001011111111010011101101100010100011110000101100011010101110110101111000110101011110100000011101001010110000100111010010100110111000000101101010010011110110110010001000001011...

result:

ok "101001101101001011111010100110...0111010001111111010111110110100"

Test #39:

score: 0
Accepted
time: 3663ms
memory: 223860kb

input:

1000000 1000000
696020 833965 576460752303423487
99972 198523 576460752303423487
84136 107829 576460752303423487
307779 397452 576460752303423487
51333 236880 576460752303423487
72519 179021 576460752303423487
4451 152250 576460752303423487
854699 879082 576460752303423487
89380 406430 5764607523034...

output:

000000000000100000000001101010000000000000000100000100000000000000000001000001000000000111001100001000000000100000000000001000000000001000000000100000000010000000000001000000000010000000000001010100010010000000000000000001000000000000000000100010000000000000000000010000010000000000000000000000000000...

result:

ok "000000000000100000000001101010...0000000000000001000000000000100"

Test #40:

score: 0
Accepted
time: 4764ms
memory: 280456kb

input:

1000000 1000000
584818 584818 88562774738731007
219655 219655 88562774738731007
325712 325712 88562774738731007
61940 61940 88562774738731007
126729 126729 88562774738731007
816875 816875 88562774738731007
253179 253179 88562774738731007
282860 282860 88562774738731007
86435 86435 88562774738731007
...

output:

111111111111111111111111111111111111111111111111111111101111111111111011101011011011111011111111011010111101111111111111111111111101111011111011111111110011011111111101110111111111111111111101111111111111101111111111111011111111111111110111100010111101011111111111111111111111111101111011111110111111...

result:

ok "111111111111111111111111111111...1111011110101111111111011111111"

Test #41:

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

input:

1000 1000
895 970 574423955081248767
336 336 574423955081248767
798 798 574423955081248767
602 602 574423955081248767
640 640 574423955081248767
839 988 574423955081248767
855 918 574423955081248767
502 502 574423955081248767
16 85 574423955081248767
402 402 574423955081248767
62 214 574423955081248...

output:

011110010101110011111100100000101111010011110010110111001100110010110011100101000111111101010111100111001101000000010000011100100110100000110111001010111111110110111101011110111111101110010111100011101001111100010110110000000000001101000010101000101000000011001001111011010001100110110010100110101010...

result:

ok "011110010101110011111100100000...1111011110011100100110000010111"

Test #42:

score: 0
Accepted
time: 17ms
memory: 11276kb

input:

10000 10000
6813 9116 576460752303423487
519 1298 576460752303423487
367 831 576460752303423487
5825 9007 576460752303423487
991 1281 576460752303423487
1616 1832 576460752303423487
3904 3904 576460752303423487
2862 2862 576460752303423487
2359 2359 576460752303423487
6553 6914 576460752303423487
22...

output:

000000111010000000010000100000100110000100000100000000100000110011011110111000000000110001000000010010000100001011000010000110000000001000110111101000001001000000000000000010100101000000000010001000000000100001000000000000001110010001000100010000100110000100000000000000100100000010100000001101110010...

result:

ok "000000111010000000010000100000...0100001011000010110000010100000"

Test #43:

score: 0
Accepted
time: 268ms
memory: 32568kb

input:

100000 100000
84862 98139 13257498890862591
25575 25575 13257498890862591
63029 63029 13257498890862591
21860 21860 13257498890862591
15303 15303 13257498890862591
80121 80968 13257498890862591
5736 9259 13257498890862591
4227 8095 13257498890862591
20355 20355 13257498890862591
1189 7175 1325749889...

output:

011110001001101101111111111100011011001100110111101110010110101010110111111010111110111101100111100111111011001001010100001100010001010011011001000111010111010010111011101101101011100011111110011111111001011101101111101110101111111101111100111111101111010111111110110011100011100011110111100101110001...

result:

ok "011110001001101101111111111100...1111011010011010101110110100111"

Test #44:

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

input:

1 1
1 1 1000000000000000000

output:

1

result:

ok "1"

Test #45:

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

input:

1 2
1 1 1000000000000000000
1 1 999999999999999999

output:

11

result:

ok "11"

Test #46:

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

input:

2 3
1 2 1000000000000000000
2 2 0
2 2 1000000000000000000

output:

010

result:

ok "010"

Test #47:

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

input:

13 32
4 12 0
6 13 0
4 9 0
8 10 1
4 6 0
11 12 1
1 12 0
7 13 0
4 9 0
1 7 0
12 13 1
10 13 0
2 3 1
1 9 0
2 3 0
1 13 0
3 5 0
5 13 0
9 9 0
5 11 0
4 13 0
6 13 0
5 13 0
4 7 0
11 12 0
8 10 0
7 7 1
6 7 1
11 11 0
3 3 0
1 4 0
2 4 0

output:

00000000000000000000000000000000

result:

ok "00000000000000000000000000000000"

Test #48:

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

input:

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

output:

00000000000000000000000000000000000000000000000000

result:

ok "00000000000000000000000000000000000000000000000000"

Test #49:

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

input:

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

output:

00000000000000000000000000000000000000000000000000

result:

ok "00000000000000000000000000000000000000000000000000"

Test #50:

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

input:

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

output:

00000000000000000000000000000000000000000000000000

result:

ok "00000000000000000000000000000000000000000000000000"

Test #51:

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

input:

30 99
11 19 0
11 20 0
18 24 0
3 7 0
24 30 0
2 29 0
20 26 0
13 24 0
12 19 0
6 24 0
17 26 0
7 14 0
10 27 0
17 25 0
2 5 0
13 22 0
4 5 0
18 25 0
19 19 0
1 6 0
13 28 0
3 17 0
9 13 1
5 10 0
2 14 0
2 12 0
5 23 0
12 17 0
20 23 0
5 25 0
6 13 0
13 21 0
11 22 0
13 26 0
14 15 0
4 24 0
17 25 0
15 27 0
8 16 0
24 ...

output:

000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000

result:

ok "000000000000000000000010000000...0000000000000000000000000000000"

Test #52:

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

input:

30 30
13 16 0
19 21 0
3 15 0
18 28 0
9 28 0
8 9 0
4 29 0
17 17 0
24 24 0
9 30 0
10 19 0
1 29 0
15 22 0
4 10 0
17 18 0
11 21 0
16 17 0
13 30 0
5 14 0
8 24 0
27 28 0
19 26 0
3 16 0
2 25 0
3 4 1
16 19 0
19 28 1
23 29 0
3 25 0
1 16 0

output:

000000000000000000000000001000

result:

ok "000000000000000000000000001000"

Test #53:

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

input:

30 30
18 18 1
9 13 1
27 28 1
18 26 1
11 13 1
18 29 1
10 10 1
10 29 0
9 15 1
22 25 1
19 20 1
18 30 1
12 29 1
17 21 1
23 23 1
22 26 1
18 26 1
9 26 1
9 18 1
14 22 1
14 16 1
12 23 1
3 27 1
1 21 1
8 15 1
12 17 1
15 17 1
19 29 1
5 26 1
4 15 1

output:

000000010000000000000000000000

result:

ok "000000010000000000000000000000"

Test #54:

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

input:

100 20
20 38 0
14 69 1
33 49 0
23 42 1
58 91 0
83 86 1
71 71 0
64 66 0
88 88 0
55 55 0
81 91 0
50 92 0
29 89 0
2 36 0
24 50 0
11 62 0
49 67 0
48 49 0
53 53 1
22 49 0

output:

01000000000000000000

result:

ok "01000000000000000000"

Test #55:

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

input:

100 20
19 94 1
34 67 1
44 57 1
30 41 1
53 73 0
28 82 1
35 57 1
2 2 1
39 48 1
6 47 1
3 19 1
23 95 1
42 66 1
3 49 1
13 99 1
44 70 1
3 92 1
20 87 1
56 86 1
36 38 1

output:

00001000000000000000

result:

ok "00001000000000000000"

Test #56:

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

input:

50 20
3 6 1
5 15 0
43 44 1
11 44 0
4 26 0
1 9 0
15 26 1
9 26 0
21 47 0
31 37 1
21 44 1
8 29 0
10 23 0
11 35 0
43 48 0
5 50 0
29 35 1
1 38 1
17 47 0
13 33 1

output:

00000000000000000100

result:

ok "00000000000000000100"

Test #57:

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

input:

50 20
37 45 1
26 32 1
7 19 1
3 12 1
31 34 1
40 48 1
9 28 1
16 17 1
3 18 1
10 38 1
15 40 1
26 26 1
11 33 1
27 32 1
3 22 1
6 24 1
2 35 1
35 38 1
38 39 0
29 40 1

output:

00000000000000000010

result:

ok "00000000000000000010"