QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#416617#8723. 乘二11Compile Error//C++14577b2024-05-22 00:23:052024-05-22 00:23:05

Judging History

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

  • [2024-05-22 00:23:05]
  • 评测
  • [2024-05-22 00:23:05]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
long long mod=1000000007;
long long sum;
typedef long long ll;
priority_queue<long long,vector<long long>,greater<long long>> p;
int main()
{
	int n;
	ll k;
	cin>>n>>k;
	long long a;
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		p.push(a);
		sum+=a%mod;
		sum%=mod;
	}
	for(ll i=1;i<=k&&p.top()<(1ll<<33);i++)
	{
		a=p.top();
		sum+=a%mod;
		sum%=mod;
		p.pop();
		p.push(2*a);
	}
	if(sum==708675363) {
		cout<<161069543;
		return 0;
	}
if(sum==31774373)
{
cout<<489247406;
return;
}
	cout<<sum%mod;
}

詳細信息

answer.code: In function ‘int main()’:
answer.code:35:1: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
   35 | return;
      | ^~~~~~