QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#415964 | #8723. 乘二 | mwoier | WA | 0ms | 3812kb | C++14 | 419b | 2024-05-21 13:10:05 | 2024-05-21 13:10:05 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N = 2e5+5,M=1e9+7;
typedef long long LL;
int n,k;
LL t;
priority_queue<LL> q;
int main(){
scanf("%d %d",&n,&k);
for(int i=1;i<=n;i++) {
scanf("%lld",&t);
q.push(t);
}
while(k--){
t = q.top();
q.pop();
q.push(t<<1);
}
LL res=0;
while(q.size()){
res +=q.top()%M;
res %=M;
q.pop();
}
printf("%lld",res);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3812kb
input:
3 3 7 2 1
output:
59
result:
wrong answer 1st numbers differ - expected: '15', found: '59'