Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: onlyme910
Problemset: ประมูลการกุศล
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-08 16:04:35
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,s,price = 0,win = 0;
cin >> n;
for(int i =0;i<n;i++){
cin >> s;
if(s > price){
price = s;
win += s;
}
}
cout << win;
}