112512024-07-29 12:21:36bzyVásárlások inflációs hatása (75 pont)cpp14Wrong answer 3/753ms632 KiB
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,k;
	cin>>n>>k;
	int money = 0;
	vector<int>P;
	for(int i = 0;i<n;i++){
		int p;
		cin>>p;
		P.push_back(p);
	}
	sort(P.begin(),P.end(),greater<int>());
	for(int i = 0;i<n;i++) money += P[i]*pow(2,i);
	cout<<money<<endl;
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/75
1Accepted0/03ms356 KiB
2Wrong answer0/03ms356 KiB
3Accepted1/13ms356 KiB
4Accepted1/12ms356 KiB
5Accepted1/13ms356 KiB
6Wrong answer0/13ms228 KiB
7Wrong answer0/13ms356 KiB
8Wrong answer0/13ms504 KiB
9Wrong answer0/12ms632 KiB
10Wrong answer0/13ms376 KiB
11Wrong answer0/23ms228 KiB
12Wrong answer0/53ms492 KiB
13Wrong answer0/52ms256 KiB
14Wrong answer0/53ms356 KiB
15Wrong answer0/53ms504 KiB
16Wrong answer0/53ms376 KiB
17Wrong answer0/53ms504 KiB
18Wrong answer0/53ms228 KiB
19Wrong answer0/53ms504 KiB
20Wrong answer0/53ms372 KiB
21Wrong answer0/53ms228 KiB
22Wrong answer0/53ms428 KiB
23Wrong answer0/53ms356 KiB
24Wrong answer0/53ms376 KiB