UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#215010#2481. 或a_sad_soul0314ms2772kbC++11379b2024-11-25 19:54:202024-11-25 23:06:20

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int n;
ll k,x;
const int MAXN = 2e5+10;
ll a[MAXN];
int main(){
    scanf("%d%lld%lld",&n,&k,&x);
    for(int i=1;i<=n;++i)scanf("%lld",&a[i]);
    sort(a+1,a+1+n,[](ll a,ll b){return a>b;});
    while(k)a[1]*=x,--k;
    for(int i=1;i<=n;++i)a[i]=a[i-1]|a[i];
    cout<<a[n]<<endl;
    return 0;
}

详细

小提示:点击横条可展开更详细的信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 10
Accepted
time: 0ms
memory: 1224kb

input:

5 1 7
0 8 1048584 1572872 524296

output:

12058680

result:

ok single line: '12058680'

Test #2:

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

input:

5 1 4
266252 262153 266249 9 262144

output:

1331257

result:

ok single line: '1331257'

Test #3:

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

input:

5 1 3
262280 8388620 42205192 33554440 41943052

output:

126615708

result:

ok single line: '126615708'

Test #4:

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

input:

5 1 5
72353802 340805641 273680394 271583243 69748747

output:

1979279407

result:

ok single line: '1979279407'

Test #5:

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

input:

5 1 6
84165274 556269848 84673192 69222560 69484808

output:

3355199418

result:

ok single line: '3355199418'

Test #6:

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

input:

5 1 3
606143041 607191138 536870912 77628003 612466691

output:

1840611947

result:

ok single line: '1840611947'

Test #7:

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

input:

5 1 8
268468225 33557000 809500676 268470532 268438284

output:

6744476461

result:

ok single line: '6744476461'

Test #8:

score: -10
Wrong Answer
time: 0ms
memory: 1220kb

input:

5 1 3
6817368 541738269 805322758 537542681 806093397

output:

2960017407

result:

wrong answer 1st lines differ - expected: '2960050015', found: '2960017407'

Subtask #2:

score: 0
Wrong Answer

Test #11:

score: 10
Accepted
time: 0ms
memory: 1212kb

input:

5 3 4
4194308 0 4 0 4194304

output:

272630020

result:

ok single line: '272630020'

Test #12:

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

input:

5 2 7
201854976 67108864 144707584 69210112 75501568

output:

9892990976

result:

ok single line: '9892990976'

Test #13:

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

input:

5 7 3
9437184 276891776 269484161 67593 276889728

output:

605570702729

result:

ok single line: '605570702729'

Test #14:

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

input:

5 4 5
1131008 65552 16400 9437184 41959952

output:

26234407696

result:

ok single line: '26234407696'

Test #15:

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

input:

5 2 6
38174856 32768 167936008 134381576 134267016

output:

6079562152

result:

ok single line: '6079562152'

Test #16:

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

input:

5 8 3
134251648 75533316 84969482 345014282 285248644

output:

2263983688910

result:

ok single line: '2263983688910'

Test #17:

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

input:

5 4 8
354464515 335589658 268546313 268505728 69219201

output:

1452222296987

result:

ok single line: '1452222296987'

Test #18:

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

input:

5 7 3
176562432 730533888 864485648 843972864 25829376

output:

1890790093744

result:

ok single line: '1890790093744'

Test #19:

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

input:

5 1 4
12588041 823286799 268719247 7370758 291928077

output:

3590290623

result:

ok single line: '3590290623'

Test #20:

score: -10
Wrong Answer
time: 0ms
memory: 1220kb

input:

5 1 5
575037452 889864196 369938440 903360544 349577222

output:

5368639662

result:

wrong answer 1st lines differ - expected: '5368705086', found: '5368639662'

Subtask #3:

score: 0
Wrong Answer

Test #21:

score: 10
Accepted
time: 0ms
memory: 1228kb

input:

10 5 3
0 0 32776 8 33587200 33587200 33554432 32768 33554432 32768

output:

8161689608

result:

ok single line: '8161689608'

Test #22:

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

input:

10 1 5
1056 5242912 71303168 71304224 1536 4194304 72353280 72353312 72351776 72352800

output:

365960864

result:

ok single line: '365960864'

Test #23:

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

input:

10 2 4
545390608 268599312 32784 268533760 268501008 98321 805306384 813858817 537067537 537002000

output:

13835665425

result:

ok single line: '13835665425'

Test #24:

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

input:

10 2 3
33554693 34603141 33689920 33685508 33558789 4329728 1184005 5243268 33554821 38801411

output:

382898655

result:

ok single line: '382898655'

Test #25:

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

input:

10 5 2
135268608 142607360 537923840 147905536 542133504 536877088 546328576 146850080 143709472 134...

output:

18167291168

result:

ok single line: '18167291168'

Test #26:

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

input:

10 7 7
135827520 135823376 134976528 134905936 135988304 660496 234512 134287424 1115216 536908800

output:

442167619214416

result:

ok single line: '442167619214416'

Test #27:

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

input:

10 1 3
8751628 57864 12928012 37938692 4696076 12747272 575014404 4433920 578996228 37988360

output:

1741684236

result:

ok single line: '1741684236'

Test #28:

score: -10
Wrong Answer
time: 0ms
memory: 1220kb

input:

10 5 4
192938904 37758592 700450576 184820864 54797312 25297424 545391248 595592728 142614928 700580...

output:

717994469272

result:

wrong answer 1st lines differ - expected: '717995534232', found: '717994469272'

Subtask #4:

score: 0
Wrong Answer

Test #31:

score: 10
Accepted
time: 0ms
memory: 1228kb

input:

20 2 7
4 0 16777216 16777220 4 16777220 4 16777216 0 4 16777216 16777220 16777220 4 0 16777220 16777...

output:

822083780

result:

ok single line: '822083780'

Test #32:

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

input:

20 2 7
0 517 4128 37 37 4613 33 549 4129 4100 549 4644 548 4 1 0 4612 4 4129 4612

output:

228069

result:

ok single line: '228069'

Test #33:

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

input:

20 10 7
2097408 280 69206016 8397080 67108864 67117072 8448 77602833 10486033 77594889 75497472 7549...

output:

21920879650286361

result:

ok single line: '21920879650286361'

Test #34:

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

input:

20 7 6
402655296 134479872 393216 672008256 402915328 134613056 537790464 402786368 671352896 402655...

output:

225471794997312

result:

ok single line: '225471794997312'

Test #35:

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

input:

20 10 7
48243216 73925122 8921602 270866 180887680 210509968 213917840 8921106 48243346 73400320 209...

output:

60426495360722834

result:

ok single line: '60426495360722834'

Test #36:

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

input:

20 1 5
276837256 70018 8491946 276865698 25199496 16851384 16875787 32794 8463155 12953 276828714 25...

output:

1468658687

result:

ok single line: '1468658687'

Test #37:

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

input:

20 8 6
2144 18360336 26216769 524784 537008 25176449 17834464 8921265 9973857 8403200 9965680 536704...

output:

44034114124273

result:

ok single line: '44034114124273'

Test #38:

score: -10
Wrong Answer
time: 0ms
memory: 1220kb

input:

20 1 7
2443080 544558872 175375192 578224592 574031376 704988880 709951576 135401296 67391440 703203...

output:

5074538488

result:

wrong answer 1st lines differ - expected: '5351370712', found: '5074538488'

Subtask #5:

score: 0
Wrong Answer

Test #41:

score: 10
Accepted
time: 0ms
memory: 1228kb

input:

20 10 5
262144 263168 262144 262144 1024 268435456 262144 1024 262144 262144 262144 0 262144 2686986...

output:

2624010268435456

result:

ok single line: '2624010268435456'

Test #42:

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

input:

20 3 8
67175488 256 67110272 1472 67174656 256 66560 1216 67175680 67110016 67109184 67109248 671091...

output:

34461124032

result:

ok single line: '34461124032'

Test #43:

score: -10
Wrong Answer
time: 0ms
memory: 1220kb

input:

20 3 7
526096 17310464 16777488 16777472 1792 9728 17310720 17310992 17310480 16777216 532480 1280 5...

output:

5937672048

result:

wrong answer 1st lines differ - expected: '5938020208', found: '5937672048'

Subtask #6:

score: 0
Wrong Answer

Test #51:

score: 10
Accepted
time: 0ms
memory: 1216kb

input:

500 3 6
536879104 536879104 536879104 8 8200 8192 536879104 8 536870920 8192 536879112 536879104 536...

output:

116502767304

result:

ok single line: '116502767304'

Test #52:

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

input:

500 3 8
6664 4609 6656 6664 2568 6657 2056 2568 521 6144 6664 2569 2057 6656 6656 4617 4617 6664 460...

output:

3414537

result:

ok single line: '3414537'

Test #53:

score: -10
Wrong Answer
time: 0ms
memory: 1228kb

input:

500 7 3
17833984 29427968 4270080 4202496 4270080 1124608 17834240 5310464 29433856 13631744 2202009...

output:

66670127872

result:

wrong answer 1st lines differ - expected: '66672621824', found: '66670127872'

Subtask #7:

score: 0
Wrong Answer

Test #61:

score: 10
Accepted
time: 0ms
memory: 1248kb

input:

5000 4 6
268435456 0 64 268435520 268435520 66 268435458 268435520 66 2 64 268435456 268435456 64 64...

output:

348160872034

result:

ok single line: '348160872034'

Test #62:

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

input:

5000 5 4
16843840 16843840 16786432 65600 1024 9280 66560 73792 16777280 66560 1088 64 65536 1678643...

output:

17273267264

result:

ok single line: '17273267264'

Test #63:

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

input:

5000 8 4
17825921 17039360 134217729 152313856 151265280 17891456 1310848 18161793 150994944 1710502...

output:

9986496602241

result:

ok single line: '9986496602241'

Test #64:

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

input:

5000 7 2
201334833 536936481 604315648 536936480 746651680 327729 545259536 8388608 8388608 53719862...

output:

96344553649

result:

ok single line: '96344553649'

Test #65:

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

input:

5000 10 4
18885206 4202640 20974160 543170758 2097878 553650326 555755654 16779474 553656404 5536503...

output:

587150707927766

result:

ok single line: '587150707927766'

Test #66:

score: -10
Wrong Answer
time: 1ms
memory: 1260kb

input:

5000 3 4
17859956 554107396 17073668 1229604 16926497 19072580 17269312 16795221 556073508 540427524...

output:

36204697461

result:

wrong answer 1st lines differ - expected: '36204699509', found: '36204697461'

Subtask #8:

score: 0
Wrong Answer

Test #71:

score: 10
Accepted
time: 24ms
memory: 2768kb

input:

200000 1 2
136 524288 524296 524416 136 128 524288 128 136 0 136 136 136 0 128 0 524424 0 524416 524...

output:

1573272

result:

ok single line: '1573272'

Test #72:

score: 0
Accepted
time: 20ms
memory: 2768kb

input:

200000 1 3
67108865 16777217 21037056 65537 20971521 1 16842753 16842753 67108865 83951617 65536 209...

output:

264437763

result:

ok single line: '264437763'

Test #73:

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

input:

200000 1 3
134418440 402788392 402718760 196664 135216 134217752 40 402853912 134807608 725000 40285...

output:

1479225528

result:

ok single line: '1479225528'

Test #74:

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

input:

200000 1 2
536871951 33794 537001993 671252488 537001990 131080 134217738 132103 134251523 671089675...

output:

2013760543

result:

ok single line: '2013760543'

Test #75:

score: -10
Wrong Answer
time: 31ms
memory: 2772kb

input:

200000 1 3
796800 2762752 2100640 2229408 158880 2384896 2508960 2884640 3032480 2124192 2386304 402...

output:

11496928

result:

wrong answer 1st lines differ - expected: '11501536', found: '11496928'

Subtask #9:

score: 0
Wrong Answer

Test #81:

score: 10
Accepted
time: 28ms
memory: 2768kb

input:

200000 6 7
67108864 536870912 71303168 67108864 608174080 541065216 67108864 608174080 536870912 536...

output:

71551676317696

result:

ok single line: '71551676317696'

Test #82:

score: 0
Accepted
time: 22ms
memory: 2768kb

input:

200000 1 3
134807552 134746112 0 138940416 134808576 4194304 134217728 65536 529408 138478592 139006...

output:

417020928

result:

ok single line: '417020928'

Test #83:

score: -10
Wrong Answer
time: 19ms
memory: 2768kb

input:

200000 1 5
33088 276824424 32888 268468560 268435768 276856848 8388880 268435560 268468288 33056 268...

output:

1384286072

result:

wrong answer 1st lines differ - expected: '1384286200', found: '1384286072'

Subtask #10:

score: 0
Wrong Answer

Test #91:

score: 10
Accepted
time: 20ms
memory: 2768kb

input:

200000 7 2
4 67108864 4 67108868 1 1 67108869 0 67108869 67108868 67108864 1 67108864 67108868 67108...

output:

8657044101

result:

ok single line: '8657044101'

Test #92:

score: 0
Accepted
time: 26ms
memory: 2768kb

input:

200000 10 5
268501120 553648130 268435456 285212800 16777346 536936450 805306496 822149250 805372034...

output:

8028801269596914

result:

ok single line: '8028801269596914'

Test #93:

score: 0
Accepted
time: 32ms
memory: 2768kb

input:

200000 7 6
570950536 34078976 67113352 603984000 34083200 67634048 537400200 264 603984256 537395720...

output:

178616942821256

result:

ok single line: '178616942821256'

Test #94:

score: -10
Wrong Answer
time: 32ms
memory: 2772kb

input:

200000 2 6
1581056 33579296 1573156 102261028 1589540 100679684 67657728 101187584 35135780 67649572...

output:

3749570868

result:

wrong answer 1st lines differ - expected: '3749570980', found: '3749570868'