QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#597021#3803. The Cross Covers EverythingNumbering#AC ✓196ms29412kbC++172.3kb2024-09-28 16:53:582024-09-28 16:53:59

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 12044kb

input:

10
10 4
18 12
26 16
28 24
30 25
33 31
37 41
41 43
46 46
50 49

output:

1

result:

ok single line: '1'

Test #2:

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

input:

1000
1 1
5 2
8 5
9 10
11 11
13 12
18 14
23 18
26 23
32 39
35 40
39 44
52 45
59 50
61 51
66 54
68 62
70 64
73 68
92 70
98 75
100 83
102 86
104 93
106 98
119 100
121 101
138 103
139 104
141 105
149 119
153 125
155 132
162 138
164 140
166 150
171 152
173 160
181 174
182 175
185 179
187 184
194 185
195 ...

output:

1

result:

ok single line: '1'

Test #3:

score: 0
Accepted
time: 129ms
memory: 20440kb

input:

200000
11 5
24 8
33 10
55 16
58 17
63 25
64 26
87 31
97 34
109 35
114 37
138 40
142 42
146 51
164 56
166 61
169 64
170 65
179 66
184 70
187 77
190 85
191 91
195 94
197 113
202 118
209 120
214 123
216 125
219 126
220 127
221 132
239 135
243 143
244 152
245 155
247 160
254 161
257 168
261 171
262 176
...

output:

1

result:

ok single line: '1'

Test #4:

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

input:

10
8 46
13 40
14 38
15 28
21 26
24 25
26 20
28 14
36 13
47 4

output:

0

result:

ok single line: '0'

Test #5:

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

input:

999
7 4990
12 4988
16 4987
17 4971
18 4970
30 4961
31 4960
43 4951
49 4933
57 4932
60 4930
67 4926
72 4921
74 4911
87 4908
88 4907
96 4906
97 4898
99 4893
106 4892
118 4882
121 4877
127 4874
132 4861
135 4843
144 4838
145 4829
157 4828
160 4822
163 4821
187 4812
192 4808
197 4805
200 4798
207 4795
2...

output:

0

result:

ok single line: '0'

Test #6:

score: 0
Accepted
time: 141ms
memory: 28444kb

input:

199999
2 999995
3 999986
9 999982
12 999976
27 999970
34 999969
37 999968
47 999964
52 999960
57 999958
60 999956
71 999954
72 999953
73 999948
86 999947
103 999944
106 999940
110 999934
111 999933
124 999931
134 999926
135 999919
137 999911
140 999909
154 999906
158 999905
185 999890
200 999883
207...

output:

0

result:

ok single line: '0'

Test #7:

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

input:

10
50 3
37 6
32 12
31 15
28 17
15 25
11 26
10 34
6 37
3 42

output:

0

result:

ok single line: '0'

Test #8:

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

input:

998
4984 3
4983 9
4981 17
4975 27
4973 32
4969 38
4960 49
4956 53
4955 59
4950 63
4943 65
4932 76
4917 81
4911 85
4902 93
4895 97
4889 104
4887 106
4885 111
4878 115
4869 120
4858 129
4842 130
4841 134
4837 140
4836 152
4831 153
4829 156
4825 172
4824 181
4821 195
4820 202
4819 210
4818 215
4817 227...

output:

0

result:

ok single line: '0'

Test #9:

score: 0
Accepted
time: 135ms
memory: 29412kb

input:

199998
999990 3
999978 9
999976 15
999973 17
999967 19
999961 21
999952 22
999949 23
999938 32
999935 34
999926 35
999915 56
999908 63
999905 71
999903 74
999898 78
999897 80
999893 88
999892 89
999891 98
999888 100
999881 101
999878 112
999877 117
999871 118
999866 121
999859 125
999853 129
999850 ...

output:

0

result:

ok single line: '0'

Test #10:

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

input:

10
11 30
6 50
9 21
16 18
14 32
40 15
42 47
35 33
3 39
39 40

output:

1

result:

ok single line: '1'

Test #11:

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

input:

998
4365 3873
3104 4109
903 3554
1680 1619
2938 251
3622 816
1606 1349
804 3077
2358 3640
2428 2564
3490 933
605 4486
893 4080
3698 4161
4518 2526
3956 4458
732 2077
3977 3200
1767 3947
3205 2626
2041 2048
4428 1939
2851 2297
4731 4806
2779 602
644 378
4227 3000
4945 1160
4768 705
1981 4103
4601 396...

output:

9

result:

ok single line: '9'

Test #12:

score: 0
Accepted
time: 82ms
memory: 17472kb

input:

100000
277609 348518
230329 10204
7264 272159
14810 351451
461848 307796
394969 133793
299007 426583
157196 312716
176966 308625
231529 494093
220949 192262
132035 308934
8348 449139
126495 138588
257648 184997
372057 420241
382402 344235
375376 300787
240247 188042
437985 186064
140595 44908
206613...

output:

9

result:

ok single line: '9'

Test #13:

score: 0
Accepted
time: 189ms
memory: 22240kb

input:

199997
974808 106373
514861 311054
29101 97621
648242 450386
580822 292488
120915 12641
229902 3166
732253 994827
452826 172960
785444 404219
927041 593335
862644 490488
904388 850512
10656 704621
524594 541866
130223 178881
285945 900049
626144 448281
285444 251123
291475 638814
387398 207187
87164...

output:

13

result:

ok single line: '13'

Test #14:

score: 0
Accepted
time: 196ms
memory: 24296kb

input:

199996
41386 959244
948671 40404
456383 970578
542451 531760
399519 154869
494308 783141
23477 554467
242985 950035
816528 178650
347631 612458
850370 521248
20517 620558
376878 752039
566743 670242
919910 219779
960845 125963
597210 825050
613957 991508
678053 194364
293783 654565
981041 831059
502...

output:

18

result:

ok single line: '18'

Test #15:

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

input:

508
2446 2496
2038 1030
1631 853
2320 1213
8 1295
2153 1111
1309 1947
1663 2121
1028 1847
1652 2120
2062 2322
287 217
296 220
748 1755
1634 2115
1696 870
1473 801
2262 2411
72 33
1390 734
2099 1074
1077 1866
2328 2447
785 1763
2271 1175
528 302
1499 811
2251 2397
186 101
836 1781
132 1368
386 1502
4...

output:

1

result:

ok single line: '1'

Test #16:

score: 0
Accepted
time: 115ms
memory: 21908kb

input:

199995
813696 406431
349470 173593
757535 878376
668948 833837
382275 189961
233092 615408
704759 351947
392800 195391
502674 750695
717594 858432
934850 466569
142461 569786
186701 592109
482280 740593
61074 30837
8515 4331
822378 410672
563132 281853
124521 62353
838630 418645
959860 980083
689311...

output:

2

result:

ok single line: '2'

Test #17:

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

input:

509
2217 203
255 2446
1474 1827
257 2442
2360 1362
55 2530
1663 1719
2314 171
808 2161
2066 286
392 1036
2446 1287
774 2184
2278 1397
1528 502
711 840
84 1221
784 2178
2433 1301
104 1214
2024 1484
2057 1474
1757 1653
1292 602
475 2318
2377 1356
1488 1821
1339 582
1413 1851
2211 220
566 945
1508 504
...

output:

0

result:

ok single line: '0'

Test #18:

score: 0
Accepted
time: 110ms
memory: 26936kb

input:

199996
37096 981759
785799 106535
671896 663676
690654 154870
485714 257678
596648 701547
329757 834933
44251 478235
542018 728820
596824 201782
106646 446358
827262 85716
109435 445066
193529 903419
849346 74671
713376 143203
75194 962842
573345 712825
47803 976524
845257 577262
514883 242721
11824...

output:

0

result:

ok single line: '0'

Test #19:

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

input:

888
3958 2693
1849 281
4222 2457
2658 4054
1569 560
3341 3326
4079 2555
3382 3254
41 2184
3797 2813
4069 2574
941 1224
3585 3056
4390 2270
2673 4017
2231 4398
2329 4294
4281 2396
1531 587
3314 3358
1295 858
3420 3205
1145 1009
1055 1129
2051 109
2726 3932
2687 3982
2794 3885
1968 174
4416 2249
260 1...

output:

197136

result:

ok single line: '197136'

Test #20:

score: 0
Accepted
time: 12ms
memory: 13452kb

input:

22222
7583 47924
55117 21
34982 20045
64953 101191
15781 39686
10836 44518
36375 18572
60392 105585
42595 12216
105685 60552
104258 61900
93668 72246
17090 38205
79988 85463
20008 35203
92509 73349
65851 100221
55485 110723
95420 70547
1986 53436
76151 89235
66264 99772
84401 81003
35525 19530
42047...

output:

123454321

result:

ok single line: '123454321'

Test #21:

score: 0
Accepted
time: 27ms
memory: 15572kb

input:

54321
174977 232666
242251 165658
159100 248418
167100 240206
95096 40892
102944 32286
80964 55547
144570 262426
56121 80425
207780 200017
216403 191128
85927 50258
105372 29833
30865 106041
68955 67680
116990 18077
63336 73206
155065 252305
127054 8093
247642 160563
114381 20910
72930 63781
49944 8...

output:

737692760

result:

ok single line: '737692760'

Test #22:

score: 0
Accepted
time: 148ms
memory: 26540kb

input:

198765
437314 58600
473273 23998
572684 917019
721572 770231
289997 207144
121815 376143
301656 195341
894462 597142
516330 973638
776308 714945
510422 980003
875336 616885
418331 77273
504709 985842
980980 510949
353314 143360
571752 917928
776813 714425
702804 789087
392986 102648
837521 654451
70...

output:

9876881306

result:

ok single line: '9876881306'

Test #23:

score: 0
Accepted
time: 145ms
memory: 27832kb

input:

200000
662681 837146
731753 767970
839961 658820
822678 675940
435765 63071
184877 314309
126025 372431
829444 669048
296944 201449
250296 248729
904431 594088
746672 753109
94824 403609
342543 155452
13003 486364
730166 769633
388850 109263
645491 854196
344413 153737
832730 665940
729201 770659
79...

output:

10000000000

result:

ok single line: '10000000000'

Test #24:

score: 0
Accepted
time: 132ms
memory: 27364kb

input:

200000
78046 422779
62885 438238
644599 853687
14007 487710
249503 250703
545206 952010
615364 882648
438491 59168
21592 480432
820685 678975
746391 753135
78048 422771
87010 413808
401738 97110
672635 825435
386221 112907
861862 637465
950609 550686
884520 614282
454971 42693
369828 129563
477245 1...

output:

10000000000

result:

ok single line: '10000000000'

Test #25:

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

input:

887
2450 3064
1381 3933
1019 4369
4193 1112
1129 4275
575 449
1435 3890
1322 4005
1905 3488
2486 2991
3693 1561
643 353
490 547
3800 1459
931 4431
3132 2269
3752 1490
2181 3267
3920 1351
1025 4353
3029 2402
3125 2277
3981 1300
2110 3323
2116 3313
2404 3139
3163 2261
1158 4229
3550 1755
1580 3750
192...

output:

125670

result:

ok single line: '125670'

Test #26:

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

input:

22221
83126 49597
22002 110761
70481 61889
104968 28085
72332 60175
18959 2799
93982 38830
79927 52779
86692 46124
12487 9440
22450 110336
57926 74455
54001 78698
98805 33843
37871 94861
23373 109395
61070 71291
56964 75413
20910 764
45345 87426
33163 99481
68523 63715
50035 82876
102483 30388
47281...

output:

79000988

result:

ok single line: '79000988'

Test #27:

score: 0
Accepted
time: 24ms
memory: 15672kb

input:

54320
71308 254078
1253 52607
253977 71630
179835 146188
177730 148305
171757 154265
259572 65618
47964 6336
49579 4897
29483 24597
247839 77860
247152 78563
243130 82859
138180 187735
147150 179158
157888 168159
163741 162475
267087 58441
475 53551
145901 180339
107968 217917
142021 184116
251388 7...

output:

472105984

result:

ok single line: '472105984'

Test #28:

score: 0
Accepted
time: 140ms
memory: 27384kb

input:

198764
207698 985383
861574 330193
840147 351459
962630 229697
557746 633737
68855 130041
279171 913580
569253 621987
536177 656095
75687 122904
783601 408580
683599 509555
832238 359734
585733 605397
30027 168768
419716 772816
460475 731935
982986 209068
877482 314454
66878 132160
764485 427866
942...

output:

6321045024

result:

ok single line: '6321045024'

Test #29:

score: 0
Accepted
time: 140ms
memory: 27720kb

input:

199999
342835 856918
424220 775364
792143 408268
254968 945350
434874 764569
849135 351089
576147 625133
457016 742475
85776 114311
494848 705083
566297 634404
154301 46135
413714 786081
709360 491180
708937 491638
315661 884067
182296 17467
475901 723753
476911 722754
552776 647819
141933 58581
154...

output:

6399840000

result:

ok single line: '6399840000'

Test #30:

score: 0
Accepted
time: 140ms
memory: 27768kb

input:

199999
843151 354123
883515 314438
364780 832008
916259 282077
25581 172186
394128 802505
868249 329763
658937 539038
135966 61497
834004 363638
382761 813778
814984 383476
279191 918548
332551 864613
135543 61843
341223 855946
100312 97359
88349 109432
570652 626765
857757 339907
544610 652066
5731...

output:

6399840000

result:

ok single line: '6399840000'

Test #31:

score: 0
Accepted
time: 142ms
memory: 26432kb

input:

199999
614110 187159
381640 417959
452847 347006
524889 275128
552825 248446
502797 297078
490434 309032
842624 958343
592002 209530
755881 45159
439438 359873
439803 359428
101694 696838
447403 352121
671274 130605
181230 617550
824499 976535
775883 25290
674376 127836
31306 768553
4367 796009
4213...

output:

6400319988

result:

ok single line: '6400319988'

Test #32:

score: 0
Accepted
time: 147ms
memory: 26340kb

input:

200000
984931 814964
841370 958789
897736 902516
458444 342321
768801 31809
473025 327882
271083 527378
10484 789394
818043 981884
405392 395823
519236 281352
787776 12403
954972 845270
309714 488661
857752 942900
222811 575263
124940 673148
113419 684573
902732 897473
95480 702711
231479 566400
315...

output:

6400000000

result:

ok single line: '6400000000'