QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#415964#8723. 乘二mwoierWA 0ms3812kbC++14419b2024-05-21 13:10:052024-05-21 13:10:05

Judging History

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

  • [2024-05-21 13:10:05]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3812kb
  • [2024-05-21 13:10:05]
  • 提交

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;
}

詳細信息

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'