Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: SXLENG.S
Problemset: ประมูลการกุศล
Language: cpp
Time: 0.002 second
Submitted On: 2026-04-11 17:59:15
#include<iostream>
using namespace std;
int main(){
int n;
cin >> n;
int max = -1;
int t = 0;
for ( int i=0;i<n;i++ ){
int x;
cin >> x;
if ( x>max ){
max = x;
t += x;
}
}
cout << t;
}