QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#693892#6619. Line Graph MatchingMENDAX#AC ✓137ms24224kbC++201.6kb2024-10-31 16:55:302024-10-31 16:55:31

Judging History

你现在查看的是最新测评结果

  • [2024-10-31 16:55:31]
  • 评测
  • 测评结果:AC
  • 用时:137ms
  • 内存:24224kb
  • [2024-10-31 16:55:30]
  • 提交

answer

#include <bits/stdc++.h>

#define endl '\n'
#define pii pair<int,int>
#define mp make_pair
#define ll long long
using namespace std;
const int N = 4e5 + 10;
int n,m;
ll ans;

int low[N],dfn[N],cntt[N],fat[N],qwq[N];
bool bri[N];

int hd[N],to[N],nxt[N],tot = 1;
ll val[N];
void add(int x,int y,ll w) {
	to[++tot] = y;nxt[tot] = hd[x];val[tot] = w;hd[x] = tot;
}
void addedge(int x,int y,ll w) {
	add(x,y,w);add(y,x,w);
}

int dfscnt;
void tarjan(int x,int ine) {
    dfn[x] = low[x] = ++dfscnt;
    for (int i = hd[x];i;i = nxt[i]) {
        int y = to[i];
        if (!dfn[y]) {
            tarjan(y,i);
            cntt[x] += cntt[y]+1;
            low[x] = min(low[x],low[y]);
            if (low[y] > dfn[x]) bri[i] = bri[i ^ 1] = 1,qwq[i] = qwq[i^1] = y;
        } else if (i != (ine ^ 1)) {
        	++cntt[y];
            low[x] = min(low[x],dfn[y]);
        }
    }
}

void solve() {
	cin >> n >> m;
	for (int i = 1;i <= m;++i) {
		ll u,v,w;
		cin >> u >> v >> w;
		addedge(u,v,w);
		ans += (ll)w;
	}
	tarjan(1,0);
	ll qe = 0x3f3f3f3f3f3f3f3f;
	for (int i = 2;i <= tot;i += 2) {
		if (bri[i]) {
			if (cntt[qwq[i]] % 2 == 0) {
				qe = min(qe,val[i]);
			}
		} else {
			qe = min(qe,val[i]);
		}
	}
	//for (int i = 1;i <= n;++i) printf("%d ",cntt[i]);
	//printf("qwq:%d\n",qe);
	if (m % 2) printf("%lld\n",ans-qe);
	else printf("%lld",ans);
}
/*
6
1234 2345
1234 0123
1234 2267
1234 3401
1234 1344
1234 2468
*/
signed main() {
	//ios::sync_with_stdio(false);
	//cin.tie(nullptr);
	//cout.tie(nullptr);
	int T = 1;
	while (T--) solve();
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

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

input:

5 6
1 2 1
1 3 2
1 4 3
4 3 4
4 5 5
2 5 6

output:

21

result:

ok 1 number(s): "21"

Test #2:

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

input:

6 5
1 2 4
2 3 1
3 4 3
4 5 2
5 6 5

output:

12

result:

ok 1 number(s): "12"

Test #3:

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

input:

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

output:

14

result:

ok 1 number(s): "14"

Test #4:

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

input:

3 2
1 2 1
2 3 2

output:

3

result:

ok 1 number(s): "3"

Test #5:

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

input:

3 3
1 2 3
2 3 1
3 1 2

output:

5

result:

ok 1 number(s): "5"

Test #6:

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

input:

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

output:

27

result:

ok 1 number(s): "27"

Test #7:

score: 0
Accepted
time: 61ms
memory: 18400kb

input:

100000 99999
54273 5761 179909546
6472 21601 924153552
610 22693 767540137
37784 2454 951330587
24457 93770 781030280
36098 27 448166069
21292 43394 244510129
58047 86330 869927899
18770 83124 20504174
24036 92856 8370757
92492 21932 734860719
43776 77624 226721931
15746 70738 429430538
71204 87185 ...

output:

49946352904479

result:

ok 1 number(s): "49946352904479"

Test #8:

score: 0
Accepted
time: 67ms
memory: 17908kb

input:

100000 99999
18547 67114 422842568
19693 8496 779855087
51167 18426 915314526
44355 50210 119625069
12950 4056 197918233
61098 35840 389797594
73234 63511 535160500
47702 90861 938540623
91579 13299 509661983
40747 91690 12909789
58827 9678 282003419
35422 9560 815634437
20241 26517 840659336
93110 ...

output:

49888240257242

result:

ok 1 number(s): "49888240257242"

Test #9:

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

input:

100000 99999
25520 2623 154792857
1765 4073 799245045
99749 45838 839182660
98677 58205 524737144
76603 55928 568414838
33898 29608 922164506
88693 78722 1129358
10136 25336 739395975
69484 68712 25516570
4182 48506 515454795
76879 82061 553583242
22090 97332 926700970
89926 81197 558183206
29662 27...

output:

49857536488340

result:

ok 1 number(s): "49857536488340"

Test #10:

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

input:

100000 99999
72042 25409 725983606
49873 52758 607305688
63918 42603 224757632
7040 60725 735261849
3210 8822 867145685
41268 9352 80358220
74405 56201 74682882
42091 83435 349445732
31907 73608 324631368
21709 60815 811088936
66131 97870 754621619
50607 17635 563355884
70943 80969 555360875
34584 9...

output:

49910465246498

result:

ok 1 number(s): "49910465246498"

Test #11:

score: 0
Accepted
time: 65ms
memory: 14520kb

input:

100000 99999
10715 1068 751750885
90390 22200 868370908
4434 24771 510418099
43553 9661 532496008
33027 9192 426178660
52737 21946 668997040
54761 24810 41781655
58813 57402 176782581
36930 1300 814097421
18356 21290 10495515
24941 88423 65937531
63377 57167 347397631
72045 91846 74407074
79044 6065...

output:

50022292101614

result:

ok 1 number(s): "50022292101614"

Test #12:

score: 0
Accepted
time: 56ms
memory: 14552kb

input:

100000 99999
5344 45257 932283560
5344 41988 113638743
5344 82319 686963255
5344 83414 26663701
5344 1956 977496010
5344 95966 782365014
5344 46605 39879251
5344 96628 313951622
5344 8440 511271264
5344 49973 635326375
5344 65604 192267424
5344 47220 582095220
5344 66302 248860581
5344 73608 9553914...

output:

49915818917837

result:

ok 1 number(s): "49915818917837"

Test #13:

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

input:

100000 99999
3177 86594 412173017
12137 23850 475526600
5700 36609 945747091
42705 16895 952974711
13273 20762 127528716
36084 39413 993327177
38688 78058 261018358
64450 44338 26313078
71735 26253 140727243
34409 30797 46489921
70650 6363 519263525
85224 21135 393220205
26063 95952 740258123
23309 ...

output:

50036601113082

result:

ok 1 number(s): "50036601113082"

Test #14:

score: 0
Accepted
time: 62ms
memory: 16660kb

input:

100000 99999
22229 18543 751135535
7355 5758 89465241
25351 24408 32346633
1290 1723 708482193
2927 931 203202153
64351 62468 884908674
57054 57317 494306164
20676 19849 342091239
40940 42005 551277474
75616 77532 868037858
75616 76286 329498801
52086 54158 44517964
33660 33441 6641884
51205 53250 8...

output:

50041438241487

result:

ok 1 number(s): "50041438241487"

Test #15:

score: 0
Accepted
time: 67ms
memory: 15016kb

input:

100000 99999
12394 19008 8690121
42452 84160 98402594
66038 8702 599957491
59875 33409 967820964
48537 66162 175673729
2340 94598 64477473
71435 70892 280040195
4591 29423 438040533
96594 96303 809428076
83628 65214 722555444
52923 84089 983107819
7884 21221 978566362
68319 22916 941485643
34544 760...

output:

50030747917871

result:

ok 1 number(s): "50030747917871"

Test #16:

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

input:

100000 99999
19248 89636 592048538
87789 33340 180587215
97054 50779 296429069
76804 140 759332379
69888 97577 174834636
57616 88007 311953045
69861 26075 915540733
5651 87404 432900153
947 88542 350870091
38357 626 553637970
82250 48612 750741251
47341 61073 722847774
1946 36801 905089216
64194 577...

output:

50049230373292

result:

ok 1 number(s): "50049230373292"

Test #17:

score: 0
Accepted
time: 64ms
memory: 20068kb

input:

100000 99999
13711 11680 332787303
35706 5012 327617586
21854 88941 855853770
12391 65240 709146325
99927 7617 217470566
49623 73230 345857373
66839 28807 489450571
1696 10490 532725410
74653 85943 912435882
72806 28214 894728983
61179 1602 929957452
41015 62762 325217871
56478 28206 858783312
99762...

output:

49963658010664

result:

ok 1 number(s): "49963658010664"

Test #18:

score: 0
Accepted
time: 73ms
memory: 22832kb

input:

100000 99999
82018 91813 231145644
17460 72187 87260839
86699 26368 400610852
1654 36542 161934234
61256 8709 923500615
85905 28852 249430336
2477 37314 770689410
58222 33431 628977031
31871 14154 749797899
69983 26089 960343042
75412 60268 444667992
21146 57648 207161607
53714 93765 545567179
69362...

output:

50101850716800

result:

ok 1 number(s): "50101850716800"

Test #19:

score: 0
Accepted
time: 64ms
memory: 16020kb

input:

100000 99999
57404 6127 491298417
62367 12304 809835506
16971 73734 376362395
9046 83871 322102288
79969 66019 938472868
12266 79039 217591981
44696 85906 750602005
943 53933 950144815
32627 14682 258398683
42718 31837 811778620
49023 61736 59946130
42846 3508 614195084
74646 9394 313232749
72789 28...

output:

50007353234667

result:

ok 1 number(s): "50007353234667"

Test #20:

score: 0
Accepted
time: 54ms
memory: 15892kb

input:

100000 99999
51142 79167 448225249
51142 36261 602736753
51142 63109 68639482
51142 8207 981787380
51142 95757 735962232
51142 40048 943591187
51142 23463 528322622
51142 65417 454781301
51142 13739 987739621
51142 14376 799440656
51142 74198 440648234
51142 71812 819542848
51142 77908 137537875
511...

output:

50000048761070

result:

ok 1 number(s): "50000048761070"

Test #21:

score: 0
Accepted
time: 71ms
memory: 15644kb

input:

100000 99999
41380 4450 742905694
72767 1178 658345330
41836 91727 606060053
23188 6683 945767168
82360 68700 894838834
74976 70779 439845375
4465 2915 359272264
19120 27299 450516079
51333 80139 869168688
62603 41177 880988050
3606 5982 724478795
89908 45492 181687583
76676 62874 742769299
41046 46...

output:

50084214982614

result:

ok 1 number(s): "50084214982614"

Test #22:

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

input:

100000 99999
78401 77764 978980497
26623 18392 165370544
50100 50020 716254921
54347 58309 729940241
11346 10778 417509150
57842 56311 239110522
3668 3446 759028000
93890 97108 824865245
38907 44646 605778537
82733 82117 336069103
16226 13439 919254395
82435 82284 283702213
23232 11783 495903259
504...

output:

49971184858598

result:

ok 1 number(s): "49971184858598"

Test #23:

score: 0
Accepted
time: 64ms
memory: 15060kb

input:

100000 99999
15815 76332 967462297
26933 94251 679209512
20871 27158 336904749
47355 97819 72356433
95905 38737 423362940
22176 13699 707134600
16922 9999 131733511
91120 72194 91072031
61820 49229 496595660
21311 14373 729478328
50356 55639 62933083
62343 42000 782237152
68606 28703 111315338
24177...

output:

50038519504429

result:

ok 1 number(s): "50038519504429"

Test #24:

score: 0
Accepted
time: 67ms
memory: 15452kb

input:

100000 99999
97965 91919 542712865
85241 71148 982682514
18156 67939 452165740
81333 32746 595159778
87449 93229 159482979
98093 12256 584400929
54649 34487 494469915
57135 28720 880223084
1053 43932 852919465
74569 50441 433547801
93151 59706 996551864
74346 99709 90123498
57081 68216 885999826
533...

output:

50184925916975

result:

ok 1 number(s): "50184925916975"

Test #25:

score: 0
Accepted
time: 65ms
memory: 20488kb

input:

100000 99999
23437 95597 558083890
12083 22520 813731033
97600 74210 506952735
67237 22949 966217370
263 49706 885056060
55025 19600 837961872
27019 84910 651776260
80881 64607 68245864
31178 47346 746239124
95305 21204 954570764
97673 78340 81870718
80059 51135 424585325
96795 82404 525622153
70359...

output:

49912656271180

result:

ok 1 number(s): "49912656271180"

Test #26:

score: 0
Accepted
time: 61ms
memory: 21516kb

input:

100000 99999
79924 47648 682687236
6694 56624 583723978
35678 58604 438221076
49763 54383 975909487
59636 22518 206154719
17988 51797 688003591
21135 30889 119456905
13623 71530 179723686
90959 10978 986327056
85208 90569 721336183
88361 54734 797804982
81901 67338 411158086
97359 69174 978474784
89...

output:

50028799513444

result:

ok 1 number(s): "50028799513444"

Test #27:

score: 0
Accepted
time: 64ms
memory: 16108kb

input:

100000 99999
52051 49476 539828113
76561 22323 389415448
25402 21750 865902060
54427 68343 780762333
20363 76531 687885617
78434 48520 851019123
96225 91526 217252462
32730 93678 120206316
88877 50277 961753271
99680 11697 683078941
92379 5827 246522121
58875 98126 629886127
73664 35851 314441151
85...

output:

49924740505987

result:

ok 1 number(s): "49924740505987"

Test #28:

score: 0
Accepted
time: 62ms
memory: 14592kb

input:

100000 99999
15604 63918 622468876
15604 6251 319575978
15604 39517 864434912
15604 47078 124456945
15604 34143 899055662
15604 21298 614148372
15604 3456 251071269
15604 87759 455238974
15604 6598 672383353
15604 14038 261642271
15604 27430 942242154
15604 92005 5436329
15604 25560 130323620
15604 ...

output:

49932561573961

result:

ok 1 number(s): "49932561573961"

Test #29:

score: 0
Accepted
time: 62ms
memory: 15136kb

input:

100000 99999
51976 34949 57381634
70746 33007 450216850
35722 55266 223237115
1569 43668 201790793
72294 19509 132175490
77485 30103 80620475
17402 94257 453980362
79135 33225 987121048
41400 10203 45387586
12570 76222 894494666
40814 16097 831021040
30566 7422 205309216
4946 85722 464537900
2789 81...

output:

50015124084002

result:

ok 1 number(s): "50015124084002"

Test #30:

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

input:

100000 99999
60328 60992 394799139
35783 47077 821520469
17666 13020 76183008
27484 32051 701398163
35783 36598 303932246
18887 17188 240082019
35783 44164 619494948
59963 56466 501063295
35783 48855 380664322
32571 32927 99237272
35783 40502 728637635
35783 47620 821741012
82440 69969 525666832
211...

output:

49876639868319

result:

ok 1 number(s): "49876639868319"

Test #31:

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

input:

100000 100001
68327 31551 375564759
26193 81015 696540160
26535 75516 805635553
43459 30803 343382462
13089 23860 24975980
87640 3875 382132425
30560 81968 611719280
35043 639 896409603
30463 44082 376121726
87269 8228 599645
46129 40846 814496644
17888 67339 413013142
98976 72014 914551403
33241 39...

output:

50026081288156

result:

ok 1 number(s): "50026081288156"

Test #32:

score: 0
Accepted
time: 71ms
memory: 16188kb

input:

100000 100011
24301 64642 186822768
60826 33854 870591313
74099 72754 492511165
4261 50512 561641029
86355 55990 654974484
83149 31377 828864964
57337 43483 961257670
28050 97620 264867971
69111 7585 346877143
46018 28413 570038620
96694 63204 852982142
25713 40078 415963406
33734 65637 448195125
58...

output:

50143210038185

result:

ok 1 number(s): "50143210038185"

Test #33:

score: 0
Accepted
time: 60ms
memory: 18000kb

input:

100000 100101
55155 83883 168741671
34292 4194 732311804
68812 17957 393932542
96702 16516 687050611
26467 95664 863249457
82623 70491 184435964
77795 87455 701279641
12344 97767 552765810
7449 94827 273427280
23902 62472 853537734
82254 44033 908986382
15367 57686 104683053
94714 93259 71945485
794...

output:

50150783432523

result:

ok 1 number(s): "50150783432523"

Test #34:

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

input:

100000 101001
30092 86875 518325039
22424 61316 566927513
40897 59213 378342301
22605 47580 792158354
14398 74044 395776728
41915 63375 891754796
56522 52872 644795347
98632 3656 901759988
12060 26855 882149019
89631 20449 979316610
36319 68286 154868999
49169 94918 869911673
44394 10035 717413782
8...

output:

50418703155551

result:

ok 1 number(s): "50418703155551"

Test #35:

score: 0
Accepted
time: 70ms
memory: 16544kb

input:

100000 110001
92378 52731 416089637
27252 34439 724359284
48050 75022 936621026
34292 70974 518478851
5101 72998 218985902
17566 39206 988982202
93819 27091 438271932
79157 91840 504513498
87455 84368 804948618
93399 1084 932663474
91404 18796 910317611
84061 3963 235551592
84061 42370 708645707
293...

output:

54855020521660

result:

ok 1 number(s): "54855020521660"

Test #36:

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

input:

100000 110001
63272 47591 560844234
72400 1680 796916791
72400 97413 145968416
72400 39420 776412026
72400 45775 155046437
72400 15157 14729338
72400 85822 135845243
72400 93955 944417318
72400 45770 114993550
72400 33371 724043473
54393 5495 624187503
72400 75559 383714021
72400 37459 177937469
724...

output:

54862347565280

result:

ok 1 number(s): "54862347565280"

Test #37:

score: 0
Accepted
time: 78ms
memory: 22120kb

input:

100000 110001
10104 70664 88795653
47152 93402 22401222
43986 31680 706609108
20236 81025 92356676
42883 3625 916980440
32719 16001 372738575
68420 67686 730108449
22091 60730 515960579
84520 38364 344942541
17914 8166 682034449
52818 71413 884814285
20835 9321 740078966
43202 42747 53083614
45937 7...

output:

55054922977743

result:

ok 1 number(s): "55054922977743"

Test #38:

score: 0
Accepted
time: 60ms
memory: 24224kb

input:

100000 100001
62306 59768 793757047
18142 57712 684053747
39998 92937 273820236
86396 34675 990222584
13868 96891 680154032
88694 61339 115917347
76401 41430 942573652
58542 32015 962807891
34589 20563 79372386
68582 78491 958417051
64170 2184 185878828
58092 31989 28593190
39732 24165 413772884
968...

output:

50125322881599

result:

ok 1 number(s): "50125322881599"

Test #39:

score: 0
Accepted
time: 54ms
memory: 16168kb

input:

100000 100011
34348 56958 228403964
14248 73476 276490713
54577 61064 352144551
48343 15245 761185643
28344 6199 414078825
31660 63825 585417019
95493 67788 407617919
46430 49075 659300743
2410 44991 873119806
58593 16287 215278709
1869 11505 445711959
38620 92203 594667447
38860 57480 368248294
306...

output:

49849615693242

result:

ok 1 number(s): "49849615693242"

Test #40:

score: 0
Accepted
time: 64ms
memory: 15944kb

input:

100000 100101
90157 71236 745645313
17132 54456 762026663
97132 23192 180054238
71511 59355 939614260
43394 71477 550439251
15906 21841 373566990
59078 5604 313593533
26869 89071 718558084
42353 29373 490577853
50917 13356 590768665
5095 80128 683436471
60065 26150 395718191
83227 45099 173773734
24...

output:

50216422074041

result:

ok 1 number(s): "50216422074041"

Test #41:

score: 0
Accepted
time: 69ms
memory: 16256kb

input:

100000 101001
52609 73425 337436420
8510 43684 739231615
60942 1976 940505326
30157 95154 289098972
69777 1394 140353618
30171 30463 73501757
76748 47131 153413338
79245 45101 399229420
49368 44571 458098908
38516 14456 695553853
4229 15723 684054250
63908 51131 903273489
36243 84149 174224016
541 9...

output:

50555994013858

result:

ok 1 number(s): "50555994013858"

Test #42:

score: 0
Accepted
time: 62ms
memory: 15588kb

input:

100000 110001
28737 46886 399302927
6510 64326 135133009
39095 67327 287572973
18148 95328 266441299
40809 54595 97780248
38914 37793 440248062
16153 43616 456045192
29343 67107 106556850
6683 75545 176541538
22735 10396 285428692
17952 80575 393157943
70398 11070 758643501
85370 14323 795625943
786...

output:

55012879033418

result:

ok 1 number(s): "55012879033418"

Test #43:

score: 0
Accepted
time: 67ms
memory: 15676kb

input:

100000 110001
99422 94634 422681278
99422 19708 315638193
99422 58317 865700880
37427 55922 534771027
54871 42224 923349072
99422 93824 662113445
99422 81826 286760960
21812 65474 923983241
99422 67894 866658808
99422 3403 150668970
99422 39368 942361503
99422 956 516950146
99422 36493 753203182
994...

output:

54863341378534

result:

ok 1 number(s): "54863341378534"

Test #44:

score: 0
Accepted
time: 71ms
memory: 19220kb

input:

100000 110001
63941 15325 769512023
1626 10508 161961146
7605 11092 174531178
73451 70200 946750378
26313 4245 449930891
72623 12691 930938139
26583 26414 436849276
2010 57367 128415002
17944 69219 62760335
90488 16948 768412669
45298 66876 170755322
73982 80348 329221422
80629 76623 820397883
34098...

output:

55020907409993

result:

ok 1 number(s): "55020907409993"

Test #45:

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

input:

99999 99999
13381 14645 224977995
51545 44760 432563790
74295 84544 844279970
13381 11879 188265632
75806 74016 349555312
57783 55959 876532121
68441 67455 749047150
59815 61897 695832529
13381 12991 133688355
25672 29459 49525597
72721 84625 478289306
65323 65304 513273001
39744 38118 608382037
934...

output:

50036467127294

result:

ok 1 number(s): "50036467127294"

Test #46:

score: 0
Accepted
time: 65ms
memory: 15400kb

input:

100000 100001
32800 33974 917775533
8747 9266 452725342
97416 97331 935764081
44261 44601 388906051
28120 28542 647947145
94084 94614 15228292
10122 13987 415152166
16408 13011 598367239
15365 13805 193386784
2989 806 738690461
44261 43366 391076174
15555 9925 972787063
17899 21964 770539031
38625 3...

output:

49958171872817

result:

ok 1 number(s): "49958171872817"

Test #47:

score: 0
Accepted
time: 63ms
memory: 17456kb

input:

100000 100011
51180 43554 979251036
46170 48256 957253388
48191 43313 116411844
55637 57281 660555251
83250 83192 670360174
63554 63477 102795276
90552 85979 232823778
27792 19295 243308255
2276 483 288871314
80801 80603 279002972
80933 82085 169535586
93126 84988 635969019
20165 23026 294866794
165...

output:

50003567923131

result:

ok 1 number(s): "50003567923131"

Test #48:

score: 0
Accepted
time: 60ms
memory: 16900kb

input:

100000 100101
38707 43308 981157836
51439 52881 25997348
78141 70962 635946943
84690 86026 820611302
63316 59286 622368329
9459 6047 897894377
56593 56068 754106265
9585 1059 899845102
20988 23965 545912024
87320 88247 997968700
99155 95460 576406345
67932 67471 955560795
78141 77599 513261995
78141...

output:

50164409248650

result:

ok 1 number(s): "50164409248650"

Test #49:

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

input:

100000 101001
55637 44656 195054906
65780 66342 913843110
3534 3448 838091084
83731 82214 986009476
24364 37344 856333088
59496 48464 659671166
2587 2691 124926031
46104 55396 142201771
58579 55621 56118875
13350 16877 852017802
57220 52894 62347064
39365 40257 963235621
1558 2160 502083598
6246 495...

output:

50529466940490

result:

ok 1 number(s): "50529466940490"

Test #50:

score: 0
Accepted
time: 67ms
memory: 17900kb

input:

100000 110001
68024 67161 482512601
6770 11224 368332103
52245 51655 779245554
48924 46718 188823146
64645 64338 661420946
48726 41820 378638329
14387 21704 862053106
16242 8531 566191669
26968 25045 175812683
64050 65333 510141477
99892 99122 126361721
66396 65903 801110497
98547 95885 91108570
620...

output:

55071621258646

result:

ok 1 number(s): "55071621258646"

Test #51:

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

input:

100000 199999
64200 83578 682730732
31411 34987 718861920
25682 57132 870237418
60265 42619 16606211
71697 4628 290683823
40073 59765 648793901
37414 32714 571407260
37945 38951 136486260
38657 44902 429280442
36221 33989 595252057
92657 92479 331343374
87836 90494 464060860
94122 94014 773601840
50...

output:

100032417176314

result:

ok 1 number(s): "100032417176314"

Test #52:

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

input:

99999 99999
83336 82717 75819418
78424 74583 892297400
128 2522 58588939
60975 68218 901879700
72675 73106 735039344
21365 22589 155434293
96587 89792 597336727
55081 51642 396273455
50565 49208 491695563
33907 33457 967040354
73407 61426 322275060
15007 16463 522231899
8484 9620 536639602
26518 268...

output:

49890119881718

result:

ok 1 number(s): "49890119881718"

Test #53:

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

input:

100000 100001
24107 11059 14166493
80113 75515 141714636
72494 72477 187643013
54139 57326 333552063
33646 38166 880326682
54549 58867 753571551
18827 23116 540310718
14444 11802 42715693
53175 57403 831973747
96917 97127 902759578
88859 88904 613151809
39952 40659 885977263
87556 77537 549209992
51...

output:

50025110469691

result:

ok 1 number(s): "50025110469691"

Test #54:

score: 0
Accepted
time: 65ms
memory: 15540kb

input:

100000 100011
5082 4356 225688648
94026 93760 37588210
40936 44044 689824668
71685 70824 100622081
28992 28750 819504248
11688 11794 202412383
40936 40799 354677093
25443 26087 119317110
622 722 525484874
1692 1291 943680679
25443 24393 837810801
20324 13200 281221831
76665 75370 183939244
61122 650...

output:

50061750218165

result:

ok 1 number(s): "50061750218165"

Test #55:

score: 0
Accepted
time: 67ms
memory: 15728kb

input:

100000 100101
10971 11307 442015757
34992 30150 565353770
9796 10055 648555478
60861 60488 778213277
54258 51782 547277393
29628 27161 493166243
76088 76624 149950847
92758 93294 332936760
10992 11106 971796186
85277 88329 366076239
5390 3997 113308104
30916 31723 612852060
75286 76160 243493526
178...

output:

50179270248898

result:

ok 1 number(s): "50179270248898"

Test #56:

score: 0
Accepted
time: 64ms
memory: 16952kb

input:

100000 101001
80062 79634 250078557
72059 71054 360888060
87776 85205 131594865
46357 49886 991036364
10730 10545 501064096
64281 57632 979695626
40864 46221 231001718
89921 92163 700348848
55553 49447 703081021
95841 95975 528318262
19202 17202 758425133
67685 69893 156450143
6930 8192 605248089
19...

output:

50461049138804

result:

ok 1 number(s): "50461049138804"

Test #57:

score: 0
Accepted
time: 74ms
memory: 18564kb

input:

100000 110001
86352 88871 770128587
77395 79402 988932643
42925 31675 809791822
42994 35818 404831005
39959 66775 848134827
42994 35878 512702489
70385 69834 181946483
85725 84485 682421490
52942 50982 716176610
93152 91694 363379668
69170 69408 559218481
6058 4973 157520933
42994 41917 565078529
98...

output:

55124449017564

result:

ok 1 number(s): "55124449017564"

Test #58:

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

input:

100000 199999
68884 69190 87986383
52439 44075 170116942
1694 30716 496883544
52566 52086 722124168
89381 38463 146453700
9276 10701 821958949
48483 82846 333137968
68470 65288 969425627
84752 81814 127590551
93298 75485 539482696
56435 55793 801988640
19340 19620 611890963
77124 74242 945223469
460...

output:

100072360825985

result:

ok 1 number(s): "100072360825985"

Test #59:

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

input:

99999 99999
73588 80426 716819152
25800 27362 352453233
27494 24213 782722347
82871 84408 183554118
28600 26176 964752762
19488 17253 806620246
42420 42755 786350437
27987 24824 388209983
75258 78314 156523573
58371 57888 348621484
70755 67649 997222765
49167 46000 902061027
54117 52966 82090275
338...

output:

49926814273192

result:

ok 1 number(s): "49926814273192"

Test #60:

score: 0
Accepted
time: 67ms
memory: 15848kb

input:

100000 100001
10142 8129 524388270
47874 51721 167232509
79805 77142 998531002
85594 85982 169829299
30811 25235 638497830
4904 3033 205879140
30811 25764 148868213
63098 63935 890363914
99966 99965 838102922
73537 75945 700516405
49985 48873 633986197
41852 42652 939998429
30811 29612 710108094
853...

output:

50054509189495

result:

ok 1 number(s): "50054509189495"

Test #61:

score: 0
Accepted
time: 65ms
memory: 15524kb

input:

100000 100011
84448 88638 770461714
27039 26465 178319813
21909 21807 224598019
44152 43810 845333873
42320 42996 737825770
45454 49693 24507705
38962 37020 633818289
58910 55925 672764652
86008 82241 693227095
99564 91713 938143578
72427 72877 909739956
15268 10762 561967562
70003 70635 281259104
8...

output:

50002383869726

result:

ok 1 number(s): "50002383869726"

Test #62:

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

input:

100000 100101
44340 44297 491070000
17274 20213 715460344
78728 79433 940292948
20662 15964 76902800
9265 11350 645999678
13354 13327 815713208
88424 88481 664109351
4848 3702 617080025
20820 15718 249389397
56380 55280 908035642
11568 10701 374726546
14802 14842 248969771
94827 97074 336102172
5887...

output:

50014939085938

result:

ok 1 number(s): "50014939085938"

Test #63:

score: 0
Accepted
time: 69ms
memory: 17552kb

input:

100000 101001
10101 8566 392417625
22729 24725 412223852
45284 46431 815811636
77464 75791 273545599
31970 30096 289175545
33636 32853 762190771
97688 93802 356536232
58223 56855 215830979
2459 6031 467921871
12712 15624 426634403
755 2271 960740307
69762 74749 879376662
12712 13805 183784641
2645 2...

output:

50426996582794

result:

ok 1 number(s): "50426996582794"

Test #64:

score: 0
Accepted
time: 71ms
memory: 18536kb

input:

100000 110001
62153 63753 425622608
70026 72583 484901293
13657 13084 77855983
84041 75456 4856506
42911 35647 847596026
36417 39572 870396561
78596 81780 226591032
32272 33979 345634851
13372 13333 683988742
40415 23079 23761708
41329 45134 72805187
73765 83330 628487805
28586 28658 355767073
47197...

output:

55103072951457

result:

ok 1 number(s): "55103072951457"

Test #65:

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

input:

100000 199999
33049 13234 18886217
22574 25322 576802995
76066 49572 981354927
78891 2171 748917283
98093 99401 402398336
34858 43166 621170425
75694 76983 397654145
42958 39629 98183569
58606 60551 361413070
88419 15701 445040096
9007 7405 187887922
66070 59628 79792077
614 16287 407822345
36401 32...

output:

99958772727640

result:

ok 1 number(s): "99958772727640"

Test #66:

score: 0
Accepted
time: 67ms
memory: 16524kb

input:

99999 99999
55248 55712 925128195
59831 59194 606060287
41939 41967 545580296
62058 64005 580663069
2246 843 383378987
26145 24906 713392517
3200 392 962934701
71338 75876 730789314
95027 99802 907280866
65949 69444 64837833
12945 5733 865213719
13491 11161 446576196
4175 4041 704137152
78106 78578 ...

output:

50054233429061

result:

ok 1 number(s): "50054233429061"

Test #67:

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

input:

100000 100001
23660 22171 210298102
41954 52104 996213546
49084 46007 49435914
17492 16629 592506914
4475 2747 423133972
69752 67931 915265822
18789 20440 798195821
36374 36912 131214163
4475 4612 670565050
42162 48010 359760057
29823 25265 104368756
49615 41473 237875036
68279 69040 245471592
62002...

output:

50142600561298

result:

ok 1 number(s): "50142600561298"

Test #68:

score: 0
Accepted
time: 61ms
memory: 15424kb

input:

100000 100011
61502 56007 920449124
44522 43295 642158745
10726 10949 254190153
60319 58995 577219838
39327 37902 631003599
91011 90228 28176532
28745 29570 318414162
70748 71543 155074116
22163 23377 193759805
53417 54127 191964713
84116 83669 75851714
90278 90214 554314836
45624 48512 747845697
62...

output:

49938950653140

result:

ok 1 number(s): "49938950653140"

Test #69:

score: 0
Accepted
time: 53ms
memory: 17020kb

input:

100000 100101
70764 70170 837067085
60795 65208 107719170
30915 22551 101098831
29381 22266 466658633
54090 54118 633808175
7670 9735 588010033
49750 49071 282731776
3910 4233 159432688
95118 83213 417559341
86858 95845 370888662
68841 69925 803509940
92837 85014 889737667
57230 58021 668682815
3372...

output:

50107037654785

result:

ok 1 number(s): "50107037654785"

Test #70:

score: 0
Accepted
time: 60ms
memory: 16876kb

input:

100000 101001
14488 12340 262817994
86050 87380 369230318
37676 36063 660120576
43246 40501 565316714
60228 62569 690749071
71930 70995 824848367
90999 91735 75264707
77184 77534 399478195
4400 4528 499290119
60228 58679 935346328
94299 95071 730429782
16168 15080 664249458
45208 50113 566839113
267...

output:

50505984049334

result:

ok 1 number(s): "50505984049334"

Test #71:

score: 0
Accepted
time: 69ms
memory: 19360kb

input:

100000 110001
89854 84109 501988488
63173 66308 992870146
50552 50427 989729772
96742 97114 325917673
32939 32545 88592978
9499 11776 870644208
14294 13198 333379482
89854 83692 739151702
89854 81963 852330599
62474 60839 382255316
25768 25725 298691165
68601 71014 812407660
50552 48344 208747226
22...

output:

54972540750743

result:

ok 1 number(s): "54972540750743"

Test #72:

score: 0
Accepted
time: 127ms
memory: 20652kb

input:

100000 199999
66743 64435 773282321
85699 19263 466529652
11186 21169 692881063
68505 62629 633945965
11667 17302 166260790
32004 27860 687822473
98411 65709 70008500
35183 43911 502345384
81758 4707 876466560
6928 58730 324667070
321 1040 875623450
20317 91324 888095270
33907 22284 250153009
6452 8...

output:

99955707253491

result:

ok 1 number(s): "99955707253491"

Test #73:

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

input:

99999 99999
47544 40560 377906204
73735 73179 473849846
37496 34557 964226607
4742 3709 799392826
16657 13784 524184018
50888 50315 113175527
22262 23193 653868718
37022 37567 797990248
48978 54501 67825471
27336 23771 903024471
82122 82526 647351855
82482 84569 726028795
36106 35899 283300025
43743...

output:

50057452380265

result:

ok 1 number(s): "50057452380265"

Test #74:

score: 0
Accepted
time: 65ms
memory: 16764kb

input:

100000 100001
39648 40292 860445940
97423 99592 663479880
82720 87933 550077498
66222 65630 290212940
85353 81695 308274701
34165 34935 871376978
34098 38197 967305062
41209 39421 714173771
57450 57237 500713707
35022 32888 78113236
79265 78789 507472613
2124 2430 363428504
43895 44671 92029312
8420...

output:

49928754187908

result:

ok 1 number(s): "49928754187908"

Test #75:

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

input:

100000 100011
2396 204 657471207
62296 59047 651085896
62351 61489 88678738
3128 5952 306939495
77057 80359 972674230
3563 4820 273670309
15298 13082 462145538
83408 83258 922394325
66948 64137 752476298
5151 6558 646265931
83739 82573 412451209
68568 62585 859911582
76201 76439 715950240
35219 3347...

output:

50098920137565

result:

ok 1 number(s): "50098920137565"

Test #76:

score: 0
Accepted
time: 67ms
memory: 15840kb

input:

100000 100101
28089 25786 945858579
41260 40877 806189755
52977 51875 969721813
77435 75133 358611023
36682 33759 958321946
25922 28487 759319721
48640 50166 294024497
48866 49181 116239761
28359 23196 785243841
8885 7957 670404946
85239 91329 649225451
69368 65517 259989045
18741 21469 959383616
87...

output:

50035709944089

result:

ok 1 number(s): "50035709944089"

Test #77:

score: 0
Accepted
time: 69ms
memory: 17764kb

input:

100000 101001
68096 65277 919200528
18921 20377 175722806
17575 13953 951526702
25011 24897 159283453
3028 2762 630653727
95751 96457 655085341
81405 78794 565461466
14239 20256 356509138
27633 25704 615577527
51522 52026 845868174
22827 24097 600774235
37980 39242 680469429
92480 91172 337475312
92...

output:

50522291700300

result:

ok 1 number(s): "50522291700300"

Test #78:

score: 0
Accepted
time: 69ms
memory: 17796kb

input:

100000 110001
38120 49543 843265322
22904 25685 563739919
54053 53925 754528345
84637 78415 423723447
97889 97191 267051693
38120 39995 567598476
76178 75602 410340955
11401 10350 49371022
93816 92766 120898062
15324 38405 289398862
65587 64298 98296821
36052 35571 874347196
57439 57051 439593515
90...

output:

54986273605250

result:

ok 1 number(s): "54986273605250"

Test #79:

score: 0
Accepted
time: 131ms
memory: 22200kb

input:

100000 199999
8887 9863 331627878
38091 36565 886394944
99954 99961 983979501
11132 584 72198023
37193 44469 875467020
64845 60334 906171086
97201 80615 383391640
33646 40166 266390556
24137 95091 472091307
45592 4545 744895856
61042 59924 959496957
94839 6849 392955883
60259 58346 975780066
52281 1...

output:

100158776033637

result:

ok 1 number(s): "100158776033637"