Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: chillxvtkz
Problemset: ประมูลการกุศล
Language: cpp
Time: 0.003 second
Submitted On: 2026-10-07 10:01:48
#include <bits/stdc++.h>
#define ll long long
#define ct cout << ' '
#define el cout << endl;
using namespace std;
const int mx = 1e9;
const int mn = 1e-9;
vector<int> v;
int n,t,sum,mm=0;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> t;
v.push_back(t);
}
for (int i = 0; i < n; i++)
{
if(v[i]>mm){
mm = v[i];
sum = sum +v[i];
}
}
cout << sum;
return 0;
}