QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#77066#3303. ChemistryMinneapolisAC ✓360ms27732kbC++204.1kb2023-02-13 01:05:192023-02-13 01:05:22

详细

Test #1:

score: 100
Accepted
time: 5ms
memory: 9444kb

input:

3 3
1 2
2 3
3 1

output:

5

result:

ok single line: '5'

Test #2:

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

input:

8 7
2 1
1 4
4 3
3 8
8 7
7 5
5 6

output:

17

result:

ok single line: '17'

Test #3:

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

input:

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

output:

28

result:

ok single line: '28'

Test #4:

score: 0
Accepted
time: 42ms
memory: 15220kb

input:

71546 24595
8809 28246
69865 39521
59898 45510
14159 68718
51299 57884
37941 55382
46820 15842
48870 4191
68160 9828
13919 1874
42999 26823
16366 40589
23660 62610
31572 40797
32555 38063
9784 41570
32958 59126
66640 20741
34720 54905
16899 15892
56032 53175
44773 62847
264 55118
23296 52750
69783 8...

output:

71546

result:

ok single line: '71546'

Test #5:

score: 0
Accepted
time: 155ms
memory: 17940kb

input:

77692 179803
36154 1994
3872 19389
40758 10280
34317 40174
10081 14474
49865 2401
42180 32957
37477 5542
17705 46105
26848 61435
34179 46299
44517 45280
61602 13998
34359 5732
76203 44560
56583 42129
49042 66004
49608 64055
8742 66847
56992 31372
2882 57473
39636 47716
56253 5843
40102 76855
8977 33...

output:

77697

result:

ok single line: '77697'

Test #6:

score: 0
Accepted
time: 167ms
memory: 18164kb

input:

107659 126372
73785 47711
63766 57670
27641 85316
74918 41713
63455 27920
82121 77652
38002 101668
79959 95049
64766 98008
40484 44805
44993 106036
82317 23767
40193 55061
3182 68531
101773 54029
67925 63819
72264 43830
63208 14471
74018 20123
93216 96067
85070 49551
96866 96908
105022 35383
92404 9...

output:

107662

result:

ok single line: '107662'

Test #7:

score: 0
Accepted
time: 293ms
memory: 26672kb

input:

222590 184426
107126 62780
121700 88437
110573 208070
179624 153427
81288 57239
121255 54722
3229 90014
218064 54416
210628 145556
89326 86422
141367 45324
84505 192013
105005 164541
57334 26441
193168 73659
95093 63905
115358 47688
164274 16344
104932 101165
54799 46526
121789 155242
196081 140168
...

output:

222592

result:

ok single line: '222592'

Test #8:

score: 0
Accepted
time: 45ms
memory: 15520kb

input:

104028 9927
15068 50960
30939 13544
38281 57808
58520 94754
54943 74342
8842 58870
26413 98103
29711 1067
99737 34648
82660 17202
14270 20899
5927 60553
33978 14795
33206 25203
13065 33738
56491 52216
49546 37430
15348 44307
35446 13237
19245 17921
43358 37610
2240 5281
86728 65550
16667 102145
3477...

output:

104029

result:

ok single line: '104029'

Test #9:

score: 0
Accepted
time: 42ms
memory: 11228kb

input:

3234 110552
1933 2341
1859 2149
2977 2390
1639 1517
1824 1047
2113 2890
2351 822
2222 2806
1461 1445
3125 991
2095 2038
1441 1909
16 145
1617 1685
1572 1111
711 1767
1771 804
102 1902
1149 1997
2187 2559
1842 1806
1001 901
74 288
3089 1632
2643 2050
2193 914
3203 3190
2728 2041
1400 819
786 1597
236...

output:

3302

result:

ok single line: '3302'

Test #10:

score: 0
Accepted
time: 217ms
memory: 19472kb

input:

129915 165255
39681 68502
36914 71624
66438 118084
98392 91724
123264 113110
35091 29339
45052 3361
33728 107513
2939 13175
100890 69460
106987 89741
100886 27519
81055 58103
64163 127397
12948 5596
63056 63650
1742 122678
111412 94812
33608 35726
49271 29489
123994 58132
56821 59140
101186 42443
32...

output:

129918

result:

ok single line: '129918'

Test #11:

score: 0
Accepted
time: 84ms
memory: 14184kb

input:

51119 93196
17190 45892
44781 17952
15990 30590
4390 31049
39347 33979
28898 13848
41917 6684
3083 3281
7103 4719
22558 38750
37826 21309
7063 40676
4860 1961
34405 167
45327 18822
21092 41737
47803 11588
22616 4501
34528 39418
5862 17595
41549 45588
26049 27925
44261 26290
19360 31124
43810 30462
2...

output:

51128

result:

ok single line: '51128'

Test #12:

score: 0
Accepted
time: 175ms
memory: 22576kb

input:

141814 120473
49430 85565
59282 79354
67396 20711
8854 129310
35228 3094
95858 98351
116343 57591
59130 61748
10051 6098
106572 39935
7388 52985
63183 127589
102219 42610
127478 34277
96621 7535
112629 10711
108396 119920
119659 38603
9588 114275
37699 131770
19938 106505
85076 134964
60778 44477
12...

output:

141814

result:

ok single line: '141814'

Test #13:

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

input:

51463 201861
47113 48451
832 6030
9640 17921
6154 35433
40442 9187
48894 46419
8908 46774
30829 6249
39692 5454
35936 27161
23001 26408
40976 34849
25852 20141
48836 18914
18895 43920
47896 31783
31414 43915
12926 21758
14881 31324
170 39775
21749 33366
24721 481
5770 10198
35198 3694
7962 51375
461...

output:

51469

result:

ok single line: '51469'

Test #14:

score: 0
Accepted
time: 199ms
memory: 23332kb

input:

157072 132580
76231 8583
117782 102805
36369 113468
129562 82368
146150 140912
102012 44328
69225 136200
19236 84235
132797 5477
119216 151013
16568 15879
136954 46071
73626 102805
124008 146235
87038 136992
28060 31559
96564 90241
2828 51372
92551 128016
43159 33111
19154 145086
128176 17368
14744 ...

output:

157075

result:

ok single line: '157075'

Test #15:

score: 0
Accepted
time: 79ms
memory: 12672kb

input:

12225 181913
9834 2521
10699 5611
3328 5206
8097 3222
10441 11441
5187 7801
5979 8426
8869 6394
6538 1687
7883 5650
3829 8281
1864 9890
5449 7115
5913 20
4247 10022
11485 11320
11827 11737
6931 6804
5886 9234
8925 1286
10995 11817
10466 1846
3790 8934
581 7870
5577 5718
10034 969
5039 287
10738 6700...

output:

12259

result:

ok single line: '12259'

Test #16:

score: 0
Accepted
time: 28ms
memory: 15440kb

input:

117227 3754
41564 48193
105473 5092
81179 104626
40253 2838
49523 78094
65373 48789
12624 42911
68505 44524
99970 84253
54927 81434
68157 55377
1407 38260
64535 81962
1076 28403
73443 88729
85993 31813
47099 2851
97779 87092
17534 101807
41148 46286
100462 86152
21922 48850
34014 68533
80947 98914
7...

output:

117227

result:

ok single line: '117227'

Test #17:

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

input:

154609 57017
134275 131968
23251 1191
127154 60997
71899 35239
18574 73230
85157 58812
17233 80770
81521 122489
142912 103483
67066 47788
59028 61438
134392 63041
98383 141992
94222 33718
31547 99331
30655 119370
103072 24758
11006 176
113571 36663
88760 58391
35446 73868
131733 34458
122607 109687
...

output:

154610

result:

ok single line: '154610'

Test #18:

score: 0
Accepted
time: 292ms
memory: 24788kb

input:

164728 216013
36189 89915
15811 74163
114589 150991
30799 67138
146087 134350
47625 63420
12586 50265
61315 147105
106492 63620
147346 79768
106888 81069
120005 92253
146202 116673
46731 9267
137221 156023
111598 120515
95868 63211
115996 162014
88257 56128
58361 34608
114534 116899
77270 114380
180...

output:

164729

result:

ok single line: '164729'

Test #19:

score: 0
Accepted
time: 237ms
memory: 19544kb

input:

111131 196688
44704 52155
89287 76035
80476 3846
20273 17765
26910 84147
6744 81234
46047 102149
7328 22848
53993 2978
100928 24747
18714 97830
11922 10559
30340 29402
11816 97286
4954 108468
60452 78547
10988 2668
60790 108918
82774 52771
74160 68643
42084 96044
67918 83727
85305 98341
32762 44282
...

output:

111135

result:

ok single line: '111135'

Test #20:

score: 0
Accepted
time: 96ms
memory: 13092kb

input:

22606 156675
7505 10690
17686 610
6573 21526
332 6365
13581 11052
1675 7296
1600 21246
9548 11405
15118 10539
5724 21653
16968 3313
22107 6910
1056 3093
16035 2646
2693 7463
11657 12923
14862 7764
4282 1899
3983 16747
3433 10975
859 12498
7057 6072
837 17657
16550 5318
10371 17165
5898 9568
18822 15...

output:

22625

result:

ok single line: '22625'

Test #21:

score: 0
Accepted
time: 318ms
memory: 26828kb

input:

212152 229284
145141 24965
102013 81339
22265 155516
52148 197767
50915 99050
132343 13824
578 106414
11946 121712
184779 73198
150234 73529
55868 56639
124147 61154
15506 115480
166914 65183
42508 101622
120346 33865
68664 48059
116916 205323
107323 143078
68428 83865
143120 13910
178000 105665
265...

output:

212157

result:

ok single line: '212157'

Test #22:

score: 0
Accepted
time: 180ms
memory: 24344kb

input:

218418 81917
186054 73369
205122 10475
135838 122038
73531 196439
7879 190750
69350 142255
14944 154998
54726 25572
87207 86527
206756 38895
115007 183537
39929 14932
92732 71273
59768 199864
22019 165111
158474 108624
211651 120913
21308 53434
117945 157056
207265 87195
10527 212609
201669 66241
15...

output:

218418

result:

ok single line: '218418'

Test #23:

score: 0
Accepted
time: 306ms
memory: 25516kb

input:

204273 162916
121833 197583
9619 33244
41371 11088
134394 54719
130109 194733
155852 122635
165568 183068
185661 99874
156164 176790
149601 147070
133366 71743
165476 130981
158317 30393
27813 126617
145765 154006
89889 162391
145868 45004
68085 135034
53984 70627
23300 100832
37551 3818
114385 1311...

output:

204273

result:

ok single line: '204273'

Test #24:

score: 0
Accepted
time: 23ms
memory: 12644kb

input:

49835 9659
2027 22011
17820 17496
28556 32209
14903 41287
26928 23573
6344 23589
23343 12354
32829 10434
1079 13583
29517 1493
10716 4223
49269 24539
47413 4900
47031 10457
8466 16715
49539 43106
42612 39204
23670 38989
12974 49772
9662 16386
26099 48997
30675 45055
6706 31605
26712 14643
27925 4861...

output:

49835

result:

ok single line: '49835'

Test #25:

score: 0
Accepted
time: 34ms
memory: 13036kb

input:

60827 12632
4180 50810
42240 47041
13501 26408
51754 54399
9097 30398
56542 43333
723 24091
9952 41478
49207 51152
10984 46873
49949 27830
1591 58856
51010 22595
60457 50993
25994 24089
16881 51742
21914 58164
776 34316
45775 41909
29280 44167
59104 31998
35333 21143
5360 48049
57935 46692
22469 330...

output:

60827

result:

ok single line: '60827'

Test #26:

score: 0
Accepted
time: 125ms
memory: 22444kb

input:

162987 75751
98042 114239
145167 44633
7666 128634
73012 120037
118394 17198
119288 125638
152602 105002
100484 156654
58298 128591
99737 73074
43797 40444
99963 27512
141856 63967
30983 6761
33175 72077
80633 85687
461 46493
82099 120003
51285 90360
97529 161233
2561 109897
157353 96643
10824 40017...

output:

162988

result:

ok single line: '162988'

Test #27:

score: 0
Accepted
time: 197ms
memory: 23752kb

input:

178689 112815
110451 43654
28241 161304
118757 164288
19977 81992
135750 21626
170890 163534
145261 34444
173793 11563
82354 9883
153370 87732
161337 89243
107785 103946
89931 139428
35370 167741
42909 38248
85110 38901
72154 33880
13217 57010
40879 113648
128176 77325
17129 85196
101446 151193
1361...

output:

178689

result:

ok single line: '178689'

Test #28:

score: 0
Accepted
time: 297ms
memory: 27732kb

input:

247937 192270
125959 213505
92726 178059
42366 95672
140531 149130
186374 137516
148783 14682
203369 15315
134660 171866
212295 95561
69797 114736
72582 189031
5351 56932
95932 200603
176768 86686
159070 239115
39060 103642
78292 126578
127616 130512
195869 54032
528 21458
182872 195416
21702 179782...

output:

247940

result:

ok single line: '247940'

Test #29:

score: 0
Accepted
time: 302ms
memory: 24456kb

input:

151548 244923
115949 93166
149365 99850
20218 84368
35472 142823
123859 151013
21920 112080
139563 5055
108894 74805
134745 143699
42225 122756
16993 112121
600 114702
43550 62254
8541 10241
91780 102622
57395 112470
28558 65557
50422 8686
69213 65343
108168 66141
8486 102648
72009 12572
59072 45539...

output:

151552

result:

ok single line: '151552'

Test #30:

score: 0
Accepted
time: 104ms
memory: 21684kb

input:

182276 31948
70601 156328
17429 137427
156035 90084
13644 133330
71553 179077
148175 157559
53903 32772
49038 71081
153264 181525
141834 78530
66605 142822
175798 133129
116606 13444
173439 174553
141306 127582
128968 65535
146044 67843
115332 142063
117804 91290
108461 111599
77132 137809
51645 114...

output:

182277

result:

ok single line: '182277'

Test #31:

score: 0
Accepted
time: 96ms
memory: 21388kb

input:

191474 25121
186448 134564
62188 170054
18450 189039
43860 49535
106214 13787
80793 38922
54226 84582
125615 84917
118179 115918
2649 41461
71243 72480
188604 83682
136956 61185
56385 85902
4387 64788
85868 104455
114899 142055
120264 175973
19908 172379
129710 35049
72862 51855
75791 76903
13876 14...

output:

191475

result:

ok single line: '191475'

Test #32:

score: 0
Accepted
time: 116ms
memory: 14056kb

input:

23758 216091
21671 19899
13132 10206
8704 10989
4439 19121
6786 20825
13872 9434
11590 5552
23356 15070
2012 13745
14693 2895
10090 11372
14959 1684
3100 6275
20014 911
12810 14907
20578 12548
7210 2785
13005 9582
20744 22964
11344 6037
6895 3912
23387 671
9004 11733
6237 12052
12073 21984
19999 367...

output:

23773

result:

ok single line: '23773'

Test #33:

score: 0
Accepted
time: 244ms
memory: 24036kb

input:

153520 192402
72508 128510
101338 31830
140555 79924
125418 136272
115994 61051
93585 122834
32601 114560
5287 106179
71954 17388
94790 40462
59420 17620
62070 127996
50866 5778
76444 140680
56617 100714
31282 123998
48652 131943
41659 102781
82592 119366
95298 45422
2484 3095
142625 3661
68446 7342...

output:

153522

result:

ok single line: '153522'

Test #34:

score: 0
Accepted
time: 137ms
memory: 15692kb

input:

57865 192170
49602 44533
3645 14452
45236 34924
15200 23210
15055 46278
12809 42292
13297 31746
46551 24485
29349 41602
45256 37142
8082 32329
43425 47044
24973 27952
5822 42775
15094 41909
21439 8666
52553 16293
11228 54540
6324 11642
5430 58
23087 36618
36283 4524
23428 544
48213 21995
37771 53666...

output:

57868

result:

ok single line: '57868'

Test #35:

score: 0
Accepted
time: 157ms
memory: 21060kb

input:

131343 112227
41676 52398
61957 35480
21884 31763
69983 17744
69702 4869
83556 99383
42226 79077
124946 37921
130587 33918
90242 30551
78515 59017
59282 48193
110466 40377
16130 129037
61955 103410
114834 25551
121276 49114
28500 69543
119709 102433
80544 67720
32457 22338
130912 94707
98491 81761
3...

output:

131345

result:

ok single line: '131345'

Test #36:

score: 0
Accepted
time: 223ms
memory: 25860kb

input:

231660 127724
82694 130214
229101 229433
20126 43233
143445 40049
58565 220812
115974 92414
135237 198837
135362 19310
157472 172413
49888 45820
21407 53464
133715 113344
27128 45097
67350 64422
191208 65255
6064 36328
218196 33971
219595 34434
185813 173587
163997 181513
101716 178356
69440 50770
2...

output:

231664

result:

ok single line: '231664'

Test #37:

score: 0
Accepted
time: 277ms
memory: 26472kb

input:

240738 147303
80852 236272
121614 100550
57013 134176
8943 32579
96570 177010
233254 28990
220478 186860
237022 83205
95983 51099
114852 210343
49803 119208
2535 91367
184674 113420
212967 174969
184035 39442
18914 96748
43851 153382
110106 177796
199625 127370
89042 77676
174539 146857
126595 36280...

output:

240739

result:

ok single line: '240739'

Test #38:

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

input:

17559 51521
4353 9381
9836 14282
4377 15373
6941 10668
2703 14831
16872 14540
2162 13763
5709 14681
2577 3508
4849 12533
9393 3448
12889 2788
4040 2179
13694 6161
5219 14920
5144 1343
6707 5995
1921 5187
10317 13559
2278 14699
6927 17040
8477 4895
10040 8622
3589 7070
15401 10202
5770 3748
12771 840...

output:

17564

result:

ok single line: '17564'

Test #39:

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

input:

196520 112678
80878 146399
31365 51893
158570 157423
37918 36957
37082 87017
166630 176962
88574 4327
158236 68535
42241 5139
59423 43445
107806 142042
12830 83106
194724 80758
69579 132533
142134 54559
149825 120302
91736 148971
123063 5421
84017 43751
86566 26096
56724 102883
2943 165770
129024 19...

output:

196521

result:

ok single line: '196521'

Test #40:

score: 0
Accepted
time: 295ms
memory: 27264kb

input:

239353 190146
124185 225377
187059 116519
85706 184631
220132 135231
205271 77869
171593 72657
174092 238906
149209 12292
118737 153422
192324 193941
137559 198088
137023 115412
120874 63949
117214 109552
183512 117488
217672 121793
65707 59369
14709 24527
199748 185773
232028 22564
35753 224125
138...

output:

239354

result:

ok single line: '239354'

Test #41:

score: 0
Accepted
time: 83ms
memory: 14412kb

input:

57079 83885
4318 25676
4616 40999
24077 52180
10443 24309
224 48205
2495 10080
17987 27222
53667 11018
34884 20537
43645 49752
28463 51191
15972 6887
25913 28403
42884 55912
37237 15740
9825 43958
51668 11405
20782 25658
35180 13443
6828 21201
17879 31985
25216 29333
4930 16751
7491 22415
26578 3681...

output:

57082

result:

ok single line: '57082'

Test #42:

score: 0
Accepted
time: 236ms
memory: 19756kb

input:

119655 190479
41237 18420
106029 11778
29278 25169
67626 81080
106268 39958
17458 72003
23370 71248
76880 109251
13355 105550
67584 77472
23813 6991
95304 96693
91980 19799
71003 83292
34684 74501
95767 12633
89383 107117
94405 101164
79710 108529
26625 94397
64461 86512
12571 24887
47809 67771
2712...

output:

119657

result:

ok single line: '119657'

Test #43:

score: 0
Accepted
time: 79ms
memory: 12520kb

input:

16850 128244
14115 7609
7751 13518
1581 14454
12625 9833
1009 10069
15621 5089
14169 1458
4416 12527
6706 14588
7846 13641
11153 10853
1745 8103
9386 10595
10889 12012
8579 3177
5593 2725
16312 5308
12918 11815
3741 14647
14367 8162
2676 13937
14509 1852
2953 3497
10432 14438
3982 2892
7572 7128
165...

output:

16864

result:

ok single line: '16864'

Test #44:

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

input:

40814 167317
40423 31101
35249 32721
12944 22832
7692 24917
29480 19841
36387 4954
36613 32625
18504 31426
221 15903
6845 19283
26088 39819
28260 11790
8589 28173
16437 34546
37720 14667
3738 4295
22234 33613
18760 37446
27922 25945
7775 11157
23661 22119
13524 7811
37111 2585
17937 39134
8428 4631
...

output:

40823

result:

ok single line: '40823'

Test #45:

score: 0
Accepted
time: 258ms
memory: 23760kb

input:

147932 197450
5660 48163
141210 57404
24234 44770
63791 73836
6569 147262
13927 138166
129824 91100
68384 6150
127851 2482
132813 114273
77852 88864
23240 92053
85673 123239
136244 97384
135504 1160
12719 12506
113193 100268
34393 34288
76209 66169
34397 41754
44644 17950
113532 147685
115683 127214...

output:

147934

result:

ok single line: '147934'

Test #46:

score: 0
Accepted
time: 159ms
memory: 21804kb

input:

132616 92421
108212 5900
123187 129406
131605 88892
125811 131427
106735 17215
65943 49220
71561 63472
18837 100060
91176 66783
22715 91968
33902 102355
118489 43865
44494 18445
88481 67726
116861 23624
40504 667
28159 60608
127352 26969
100198 108965
101774 109382
106314 78740
99324 100737
127514 1...

output:

132617

result:

ok single line: '132617'

Test #47:

score: 0
Accepted
time: 184ms
memory: 24200kb

input:

231824 67804
136937 93750
83082 160793
109822 177393
23153 179767
153318 149061
109257 126080
99541 28433
37371 193430
75783 102796
196973 37481
101336 116729
95288 41015
84276 202070
170482 79029
24024 86702
16189 108053
152445 139495
135426 23178
73297 25486
77305 50193
141620 46278
208959 140104
...

output:

231826

result:

ok single line: '231826'

Test #48:

score: 0
Accepted
time: 311ms
memory: 26120kb

input:

205312 205895
195025 53053
11983 25660
164093 67983
194247 34137
13024 133497
166828 123302
123604 155833
146477 21713
144823 36293
50071 166041
198402 149864
192409 160936
86860 49003
92077 123208
172153 44632
14090 108270
50488 111827
151696 37584
61598 30725
201901 35020
32101 78709
147400 160052...

output:

205315

result:

ok single line: '205315'

Test #49:

score: 0
Accepted
time: 202ms
memory: 22872kb

input:

144303 140934
86554 46886
128508 21820
51132 90533
110365 115826
114130 35475
92323 113917
98830 119986
2127 32014
69261 120496
8667 110845
67207 120762
93019 57480
92200 126206
35727 81505
31893 37771
47860 142302
43917 86576
20637 359
133529 138892
7246 91006
18262 21996
92166 115621
127888 78788
...

output:

144304

result:

ok single line: '144304'

Test #50:

score: 0
Accepted
time: 217ms
memory: 19144kb

input:

82814 248324
27017 29970
62354 30513
10091 81672
58895 62600
16159 20364
72538 37044
54758 3692
69706 79040
75979 60797
16214 18529
47504 66041
44920 12988
27573 25925
68567 8240
48793 41126
52244 51362
52692 56075
43569 26675
7099 69544
20753 38238
21503 11038
74116 69833
60494 6913
77543 54644
145...

output:

82820

result:

ok single line: '82820'

Test #51:

score: 0
Accepted
time: 169ms
memory: 22928kb

input:

154329 111856
92703 103526
46033 109152
103779 140644
63113 79971
70477 146482
66962 85687
82831 88920
19719 134051
5470 46012
19283 78621
100652 93290
24255 90134
150884 66948
67201 63493
49670 48049
4146 85495
146053 96943
58122 105057
88375 113026
13307 121356
15966 129488
67871 82872
123829 1348...

output:

154331

result:

ok single line: '154331'

Test #52:

score: 0
Accepted
time: 262ms
memory: 25028kb

input:

177674 194898
60492 84534
26655 162438
136980 115074
170017 85679
134627 141455
149426 56590
141536 42611
47149 141251
96501 76213
107112 130445
9575 128393
151298 96080
135636 77748
53727 42933
59745 89139
93751 88212
119905 176316
47172 177628
26898 40286
53439 22365
124185 2526
150972 86928
39358...

output:

177680

result:

ok single line: '177680'

Test #53:

score: 0
Accepted
time: 304ms
memory: 27336kb

input:

242009 179498
166287 238527
208881 238657
19733 228786
35532 211328
90021 22543
43347 119204
2929 114423
185567 117565
220626 139696
150047 38320
73723 9935
57734 75722
224579 51822
168101 4081
1656 84266
180163 192181
47760 240401
92490 223081
226606 188659
151637 41366
105834 153535
207199 20464
9...

output:

242009

result:

ok single line: '242009'

Test #54:

score: 0
Accepted
time: 119ms
memory: 21916kb

input:

157936 63514
23053 25345
98663 7843
30978 151735
49916 153847
40214 145215
94070 16437
91396 44451
142001 140006
12514 13662
19722 148543
35227 114324
26076 63262
132642 64620
117180 149602
51796 73986
111121 29885
132294 155085
33671 10312
37263 14898
87650 25134
93869 142350
105126 142142
118023 4...

output:

157937

result:

ok single line: '157937'

Test #55:

score: 0
Accepted
time: 231ms
memory: 19768kb

input:

103887 245935
91256 78439
32252 7008
90943 94393
18933 68882
30285 66252
33163 67296
51151 92454
31605 22013
99088 43849
67154 11530
46103 30892
88756 21058
70881 7516
91552 64708
56196 71181
66665 84335
69682 3080
83020 30479
45935 69832
36314 92431
89170 92901
68938 98006
7145 79790
53808 48008
44...

output:

103892

result:

ok single line: '103892'

Test #56:

score: 0
Accepted
time: 11ms
memory: 10080kb

input:

4641 19820
1470 1679
2185 1751
3001 1817
2784 4545
2876 4577
68 474
2497 1668
1819 1984
754 2025
1478 1201
941 3324
1332 3477
895 351
2184 206
3655 3246
858 2157
4314 2865
4172 1428
3194 312
4153 3269
4228 3637
2207 410
2117 2330
3807 462
3618 378
3395 496
25 2261
233 3045
1450 2827
776 1520
4554 31...

output:

4649

result:

ok single line: '4649'

Test #57:

score: 0
Accepted
time: 175ms
memory: 18644kb

input:

101649 169199
10809 47423
43746 24175
23807 27936
589 72755
88318 94430
15387 87036
10050 72922
71159 74283
6111 2944
74693 70626
1344 51712
29624 99550
30097 1425
81349 54458
71063 28742
49359 44725
59710 35728
40537 62102
62637 96051
63515 34021
64250 53125
43047 39203
61768 9859
99912 77491
71096...

output:

101651

result:

ok single line: '101651'

Test #58:

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

input:

54213 74855
22431 51580
4339 34445
11003 17696
42764 43831
32268 32340
30885 33846
17233 9459
8977 51784
17558 6185
52687 22132
9941 21456
19636 26184
39306 5046
23189 51444
40746 28141
41582 40249
10135 22631
4354 38588
37961 31444
9919 22541
25175 4612
42807 26873
52200 50040
28589 43016
49301 389...

output:

54218

result:

ok single line: '54218'

Test #59:

score: 0
Accepted
time: 11ms
memory: 10348kb

input:

7705 17525
2127 6606
7348 1235
3531 1108
3873 7598
903 2251
7410 2193
7530 7080
3696 3378
130 4248
1627 3526
1454 5259
2570 412
3778 1997
2025 1444
6325 1997
7467 6847
1611 643
1709 6815
2359 2243
7028 1019
1716 2832
7078 2573
801 650
6072 4225
5308 5061
2044 5102
7489 1753
1598 6555
6107 1544
7517 ...

output:

7709

result:

ok single line: '7709'

Test #60:

score: 0
Accepted
time: 123ms
memory: 21796kb

input:

151368 62913
111273 1991
95789 120177
145498 37947
63179 125526
59942 63811
100792 139000
46199 17704
104869 19669
64791 150703
78440 10371
47475 35016
46637 126809
101955 120849
81749 136007
115539 95435
84911 1749
71251 110527
108662 95804
10639 147446
89065 25657
32945 85659
13885 72331
75663 307...

output:

151369

result:

ok single line: '151369'

Test #61:

score: 0
Accepted
time: 223ms
memory: 19204kb

input:

112863 183339
15967 103840
89340 3077
89478 49556
9276 80481
77803 105112
63321 16173
39470 62111
94631 31485
64718 79868
63030 105416
82200 44441
104950 103443
53859 63212
38227 11962
41836 96760
77332 14185
110251 50537
53928 78415
90764 88412
59907 93904
74144 9813
3389 67320
45102 109009
48484 4...

output:

112866

result:

ok single line: '112866'

Test #62:

score: 0
Accepted
time: 307ms
memory: 25876kb

input:

206153 184374
193516 181734
192746 150914
52506 105220
39307 71171
55778 180793
61422 43732
180405 157215
138054 128792
174873 193138
98621 29073
203488 76920
173780 148994
188330 187485
15648 32276
141378 48379
22765 21063
11733 121331
189218 126412
94051 201720
151768 100357
49517 105601
143243 20...

output:

206155

result:

ok single line: '206155'

Test #63:

score: 0
Accepted
time: 40ms
memory: 16112kb

input:

106922 17316
14772 36842
94922 104813
45738 86630
87604 32381
36869 106442
78197 6938
35365 51944
15083 94848
87821 31649
103129 90346
103481 40838
98946 14934
21043 72409
34678 3818
17257 93271
2417 40203
92607 62282
21070 81194
84191 68096
56298 58603
14971 61283
7390 101086
67784 106652
68301 941...

output:

106922

result:

ok single line: '106922'

Test #64:

score: 0
Accepted
time: 171ms
memory: 18548kb

input:

86487 202496
74939 25880
78238 18999
65404 82907
15339 75883
39459 80714
23112 81526
25058 5519
35846 24923
19951 68225
55789 63446
11571 65583
8305 57348
60493 41844
55766 16192
74321 69998
56370 29421
58565 62062
80237 82913
77164 12091
56648 19543
79992 11447
83845 2938
38282 59815
25402 36016
62...

output:

86491

result:

ok single line: '86491'

Test #65:

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

input:

111167 124436
100023 42309
38150 83203
2457 8264
75572 85746
38975 45911
85919 89084
32653 54058
55825 94135
65205 84750
21 72634
46545 63687
38066 53552
62289 68671
101692 62683
46462 42491
83625 670
79739 48408
35898 64489
56898 57590
61503 105274
70543 875
18215 58434
70572 74472
107199 83866
442...

output:

111168

result:

ok single line: '111168'

Test #66:

score: 0
Accepted
time: 92ms
memory: 21208kb

input:

148389 48376
90007 1954
16792 47680
29614 5117
93635 141318
23662 54808
91696 105485
97329 112980
132307 89768
37675 10581
2428 52804
50245 131225
118257 16235
50583 104410
31125 8148
77500 59930
9755 135347
83481 29759
42832 117798
12127 77145
37719 80161
121455 116868
43836 55582
91769 16079
12825...

output:

148390

result:

ok single line: '148390'

Test #67:

score: 0
Accepted
time: 210ms
memory: 23172kb

input:

150616 138720
22528 111077
134926 97487
105782 85352
20852 77432
38136 32867
124259 129642
111979 130273
100026 106977
14529 89141
33719 56135
110654 74881
118899 102115
121008 121815
60262 47432
61588 9722
78914 30077
105071 55740
86035 21266
125746 106514
77487 118868
120699 19356
26608 80119
1157...

output:

150617

result:

ok single line: '150617'

Test #68:

score: 0
Accepted
time: 120ms
memory: 22444kb

input:

219150 28030
107565 162845
39512 97689
59771 51768
199259 68483
16142 193603
159033 204024
41372 171094
3249 158519
131346 34778
67132 115817
66829 58324
173720 128400
168001 197590
32601 91917
83790 141147
67262 25632
200420 128343
25209 38859
27091 116782
87962 189882
62531 70835
170962 54959
1405...

output:

219150

result:

ok single line: '219150'

Test #69:

score: 0
Accepted
time: 215ms
memory: 19724kb

input:

126641 187938
63519 63559
79159 23322
22551 84198
80917 99182
48856 27823
43346 3389
18868 115565
96652 105917
52971 53364
36530 110613
96231 114174
65525 45219
32893 88720
24333 19042
854 118445
40409 120255
94232 16388
12660 67780
24294 93652
106093 91571
70430 21371
72848 104850
58103 11988
99409...

output:

126645

result:

ok single line: '126645'

Test #70:

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

input:

87061 189705
80223 71822
75260 3493
25186 70048
3269 9194
7263 35489
73609 57298
13652 74301
2145 15615
57009 53231
61888 17972
80604 14925
63778 86292
5187 42240
63533 87010
69862 36183
21544 83757
62124 67705
77308 26664
60664 14925
15164 82324
8145 75693
44724 85318
80856 59057
52194 14743
57303 ...

output:

87064

result:

ok single line: '87064'

Test #71:

score: 0
Accepted
time: 144ms
memory: 22304kb

input:

147596 90699
38217 15412
83074 82692
11373 121040
82558 81714
1702 79512
49282 31872
92446 101667
55244 54177
110504 46153
72736 15210
80636 101202
55329 2209
96907 110014
34088 111220
27617 101391
34142 100648
3055 75380
41921 100894
35599 68795
1142 4537
116129 52289
59173 57837
18754 56641
72315 ...

output:

147596

result:

ok single line: '147596'

Test #72:

score: 0
Accepted
time: 176ms
memory: 23512kb

input:

179595 100122
178935 174596
47270 86951
31377 111811
105101 48691
52204 9561
135633 89723
90464 25350
121949 68848
150735 81451
179280 84696
141104 70423
50982 127713
18056 2997
123092 96672
82402 143222
22306 43463
168285 93596
65482 48761
105842 142738
20839 135472
115321 84249
64506 67319
78057 1...

output:

179597

result:

ok single line: '179597'

Test #73:

score: 0
Accepted
time: 222ms
memory: 23812kb

input:

150584 181051
58980 6174
38381 327
78534 87768
117671 1585
101753 45901
121443 137983
55 10498
50481 131709
37101 28883
131307 18914
5243 71102
7620 1874
22107 17093
52452 117237
132080 113901
106943 94690
109412 37886
117754 148961
128995 54472
144694 8676
15924 17280
82637 17187
126288 116725
2910...

output:

150587

result:

ok single line: '150587'

Test #74:

score: 0
Accepted
time: 48ms
memory: 16440kb

input:

129979 16293
78846 36743
88910 57309
70094 40656
70765 99080
121135 74810
42187 80988
8715 31633
55172 16650
45641 118981
30103 53787
4916 108605
125780 93396
78012 8548
51187 119189
16204 2383
75743 68953
19093 99503
20555 41041
76713 59639
34008 19102
12158 46570
299 82935
58483 12512
73003 28130
...

output:

129979

result:

ok single line: '129979'

Test #75:

score: 0
Accepted
time: 68ms
memory: 12592kb

input:

29264 83051
1662 27315
2655 3200
7735 9688
6062 7612
14854 10102
11532 18029
20614 18833
18758 8412
1803 13705
12842 7417
1285 22804
28778 19792
7689 6970
4103 8968
8247 26639
24137 25313
9166 20282
21087 3163
887 24771
2375 5702
25112 12113
760 16523
18759 4697
23904 14936
3472 1794
5282 17102
1804...

output:

29270

result:

ok single line: '29270'

Test #76:

score: 0
Accepted
time: 167ms
memory: 18076kb

input:

83005 178543
70334 12388
29864 54160
54220 75784
59096 16517
11100 18924
55680 57951
41471 2204
8935 55461
24038 1945
61060 30826
14033 36546
45758 20498
2233 33441
72287 68501
65644 71399
61339 28675
34486 23871
14445 55711
45887 28298
80157 7460
78912 42810
18055 74226
58673 36718
10808 10025
2661...

output:

83011

result:

ok single line: '83011'

Test #77:

score: 0
Accepted
time: 46ms
memory: 11624kb

input:

10881 109674
1746 6449
10444 224
2036 4945
8497 4931
10496 3638
680 10836
9271 8738
70 8354
7155 4465
7604 9668
3521 10869
9175 8711
6385 6515
7173 9469
619 8156
2718 8874
9995 8594
10734 8059
4135 9038
3306 8704
3528 9413
5841 1605
382 2781
1124 1333
7537 7600
10546 5433
8819 3565
7215 7759
1813 15...

output:

10897

result:

ok single line: '10897'

Test #78:

score: 0
Accepted
time: 146ms
memory: 17336kb

input:

81842 130897
68273 43579
5732 1485
18378 14442
62472 49601
43246 14965
16542 33141
68592 29751
7450 63611
6183 25107
19676 58071
47625 44597
72672 69210
3930 20278
27222 24254
5171 797
47503 55233
44270 12983
45867 28261
39162 66970
35257 43567
31402 65800
26809 19475
775 67783
42582 57609
28543 147...

output:

81845

result:

ok single line: '81845'

Test #79:

score: 0
Accepted
time: 253ms
memory: 24412kb

input:

154718 226049
826 152904
40820 143289
20872 114877
142478 101140
46986 151559
41491 141537
126652 7535
151946 16809
6297 136296
54738 28804
108416 102728
98179 16006
15810 63045
32749 16321
59616 132465
54592 130859
108034 31529
95886 126488
119284 142834
31790 128409
90516 45069
74614 52353
39623 1...

output:

154721

result:

ok single line: '154721'

Test #80:

score: 0
Accepted
time: 108ms
memory: 14872kb

input:

56074 130903
36834 43027
30237 37401
46664 15947
47648 1322
16595 37894
24788 51790
39540 14561
15640 43199
3578 22161
1649 39685
40351 2090
22700 33270
37085 42545
52296 6304
40839 48655
51279 2535
7308 26160
46542 39120
32118 8166
39618 28577
10978 35519
22399 44465
49016 16644
36433 550
51075 262...

output:

56077

result:

ok single line: '56077'

Test #81:

score: 0
Accepted
time: 316ms
memory: 27064kb

input:

232662 196514
206411 228614
60570 65109
169626 69480
98609 10796
51255 122061
122167 56887
157608 200087
220537 101420
20096 167962
127228 200773
145800 87914
1377 136342
17161 127651
143996 112020
70262 70555
82781 210544
7154 157778
5570 155991
24663 185470
189859 1404
64924 37817
37271 48721
2273...

output:

232663

result:

ok single line: '232663'

Test #82:

score: 0
Accepted
time: 48ms
memory: 15716kb

input:

94001 21060
71580 26085
8135 20232
84391 64148
77413 12711
58670 68080
39305 55291
81427 32767
81567 88592
83098 56836
39807 65776
87794 31133
92696 77614
2954 16282
51861 772
23502 35493
79583 69038
9328 43186
14268 55624
61529 26908
48462 55948
41287 89508
1785 69428
44648 37904
73573 35567
51575 ...

output:

94001

result:

ok single line: '94001'

Test #83:

score: 0
Accepted
time: 66ms
memory: 12156kb

input:

15085 133879
1436 4154
3718 5280
13683 14354
489 10436
344 14629
8837 14466
4424 5728
1437 14150
9503 2189
5005 343
10498 10972
13028 467
2900 4000
8967 8753
6224 9086
2980 176
5174 12374
3661 8702
2133 14075
2 11755
9977 7720
224 11663
11853 7608
171 2031
10949 473
13704 591
6154 10394
11079 1831
1...

output:

15101

result:

ok single line: '15101'

Test #84:

score: 0
Accepted
time: 119ms
memory: 15164kb

input:

39610 201595
23831 10366
7289 2761
1177 36571
27292 35959
6792 34145
30480 30607
10834 36620
30818 8822
13503 931
36093 20654
38316 14337
35916 19915
35770 16445
33312 6286
6401 5609
11305 3635
17115 12113
30141 20087
8304 25784
14356 5869
16769 1167
24385 23313
30666 15351
35587 11494
35526 31692
2...

output:

39621

result:

ok single line: '39621'

Test #85:

score: 0
Accepted
time: 255ms
memory: 25464kb

input:

204607 158283
70606 172560
59258 191993
193129 46590
61427 37045
20405 65814
198659 49191
203225 31702
176681 99743
110191 104367
83804 167874
136744 53355
120908 78733
178881 160077
24493 72645
130016 105829
167988 102215
146153 33148
183970 76946
65834 88189
79786 92226
74239 194776
167768 65318
5...

output:

204609

result:

ok single line: '204609'

Test #86:

score: 0
Accepted
time: 90ms
memory: 17644kb

input:

121425 54415
80917 80878
26275 115749
55217 84973
50997 36508
52964 90041
46290 96292
68745 66591
68390 86659
24506 98454
108855 96317
42292 53272
100761 24746
71899 72302
114221 32912
115851 28008
109478 18690
30818 56742
56635 88919
88691 48154
26096 52996
2215 92709
55527 77199
26307 30972
84626 ...

output:

121426

result:

ok single line: '121426'

Test #87:

score: 0
Accepted
time: 188ms
memory: 19652kb

input:

122051 178387
93590 46906
33368 115185
91029 32553
46495 97871
36351 120023
118774 71258
48193 84758
75529 96690
57135 24050
115452 57444
39607 81598
45550 25383
119116 67311
50571 114113
99857 22841
108268 190
34848 60215
55700 8647
118706 66470
69425 120175
62647 86956
94520 105639
117375 100669
9...

output:

122052

result:

ok single line: '122052'

Test #88:

score: 0
Accepted
time: 186ms
memory: 24112kb

input:

197069 98951
113261 60449
169619 7322
183321 192581
123967 59826
71760 27008
93140 102932
20300 7835
124793 113320
14913 15989
165065 42655
15008 9607
39570 35516
26407 147197
99446 141772
3673 170823
65923 7115
83660 25969
38693 22820
157207 165044
17891 115077
179434 36412
188497 73447
56324 17246...

output:

197070

result:

ok single line: '197070'

Test #89:

score: 0
Accepted
time: 304ms
memory: 26768kb

input:

222282 201786
72654 9235
174995 171793
126131 162127
186077 185096
206127 51569
149662 160729
108542 25695
133253 175211
60370 55275
121068 35864
183924 197559
170674 189469
201046 126103
13076 188335
42660 28908
15954 124174
173699 117797
51629 97941
70517 83974
18842 171502
22485 27583
5006 154769...

output:

222283

result:

ok single line: '222283'

Test #90:

score: 0
Accepted
time: 90ms
memory: 14100kb

input:

33088 141464
26751 10402
17451 28491
24340 32178
33002 11631
10931 5657
1818 12281
14097 3857
10914 21376
4037 28524
11037 30116
28433 20267
2618 1758
15103 28153
29693 13675
22602 25078
14113 4540
15289 31253
30837 15855
1917 5556
26204 31285
17534 20749
5970 21877
4452 3887
6273 11014
21132 22805
...

output:

33099

result:

ok single line: '33099'

Test #91:

score: 0
Accepted
time: 339ms
memory: 27656kb

input:

240757 217421
167250 148845
39295 68880
236103 23326
20515 175753
96058 40405
204971 39942
116358 7848
166099 22781
229217 234069
152423 101095
228725 136006
237596 106463
238286 48488
36757 18536
177234 12962
8075 115916
107123 210898
134695 33492
58412 74539
57378 103364
89291 168019
175332 128872...

output:

240759

result:

ok single line: '240759'

Test #92:

score: 0
Accepted
time: 19ms
memory: 10772kb

input:

9031 46922
4921 912
5906 429
3981 825
7359 7472
8332 2624
7535 4761
567 6263
2112 2171
4904 2833
8062 2130
6290 8418
2304 1717
7888 5892
8467 7760
4802 7870
5904 1806
7707 6985
4582 4355
2443 4561
1843 5673
5389 480
8464 2403
5340 5791
6701 2172
3148 669
4551 8901
1939 8876
643 1102
5685 8443
5169 6...

output:

9035

result:

ok single line: '9035'

Test #93:

score: 0
Accepted
time: 83ms
memory: 13356kb

input:

19331 179781
10987 5632
2106 4395
9398 881
7657 3560
15854 3204
6755 12254
12441 12780
1920 10528
4309 4810
7895 12367
14187 742
12519 17144
13499 14399
6236 14902
18912 9103
11258 17690
15554 11831
951 14928
14250 3717
12184 1702
12320 11732
9800 4628
8017 1121
6508 8911
14998 2108
9827 8711
6203 1...

output:

19347

result:

ok single line: '19347'

Test #94:

score: 0
Accepted
time: 119ms
memory: 14088kb

input:

21007 228656
1405 15269
14419 15480
4150 15921
5816 4867
1275 12474
15523 12902
2884 8435
5829 19417
19959 12838
16212 13602
15810 11605
9345 8194
6210 15256
301 547
5128 3703
19568 12821
13804 5694
18577 7260
714 3102
1720 2310
11387 3527
995 20983
15139 5372
13426 4699
16260 14379
4073 10293
6735 ...

output:

21026

result:

ok single line: '21026'

Test #95:

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

input:

70390 206324
23602 57590
19399 4262
15598 8118
57379 10523
32169 6040
30757 60089
51339 6264
32118 53218
20318 42439
66454 63102
12786 1236
16342 45082
34517 10741
57896 30664
70079 27926
15720 61773
31091 47526
27932 59203
340 5935
53114 67303
59135 863
17687 39180
852 225
35426 32271
61833 24170
2...

output:

70398

result:

ok single line: '70398'

Test #96:

score: 0
Accepted
time: 316ms
memory: 25944kb

input:

207223 187005
164474 173286
50803 105514
119450 132905
16411 190961
183604 163362
97483 199734
102090 53854
166552 164569
4775 188940
192560 4408
168895 149332
10147 92240
53083 97493
133372 53636
97887 105084
38811 147861
73175 25858
23444 101251
162103 95455
139785 171586
8377 142907
20764 40608
1...

output:

207228

result:

ok single line: '207228'

Test #97:

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

input:

61469 86249
26934 36321
13699 39631
54962 31501
59583 29857
43172 47938
35329 477
11785 3171
13711 6857
16009 60492
34475 24155
33081 24155
29435 16135
38959 11083
28850 33143
40063 51371
44081 58102
37846 31922
12105 24975
51493 31582
23679 13991
49790 33420
28107 12002
11283 56863
20216 52086
1079...

output:

61473

result:

ok single line: '61473'

Test #98:

score: 0
Accepted
time: 220ms
memory: 23716kb

input:

164094 143738
84338 115073
86389 89863
145817 105933
71432 18079
89538 110290
97568 88057
99890 58939
122339 97872
70393 43978
27458 4656
87493 7325
93980 75700
75308 10944
70666 151694
24219 77217
163297 32447
86797 123061
36964 35092
103258 152611
6181 114850
149047 159983
692 144153
122627 38737
...

output:

164095

result:

ok single line: '164095'

Test #99:

score: 0
Accepted
time: 360ms
memory: 27036kb

input:

221413 231506
48003 219267
6774 217955
69922 56673
219065 61474
32150 184990
69154 74103
211940 14207
19281 109421
94755 127307
16238 138245
171029 183205
179980 170359
206722 152677
6335 78210
5079 16380
101497 90312
73668 174422
17280 174438
76894 186555
218764 21987
147060 78525
6740 21480
23021 ...

output:

221416

result:

ok single line: '221416'

Test #100:

score: 0
Accepted
time: 19ms
memory: 10436kb

input:

10114 16897
3130 8221
8045 1370
5826 8042
5092 10083
127 5346
8507 2729
2419 5115
3007 1414
6969 6591
720 4009
3365 159
4017 5008
8716 6384
8516 7800
6988 6527
3426 3035
2525 5331
1108 4080
5359 1222
1193 7431
679 9387
3035 893
5250 4403
7202 8884
1022 9086
9761 130
7028 9494
9322 3243
3623 268
3886...

output:

10116

result:

ok single line: '10116'