Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll t;
cin >> t;
while (t--)
{
ll n;
cin >> n;
deque <ll> a(n);
for(ll i=0;i<n;i++)cin>> a[i];
sort(a.begin(),a.end());
ll sum = 0;
sum+=a[n-1];
a.pop_back();
sum-=a.back();
cout << sum << endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1208 C. Game on Integer
- Contest
- Educational Round 1
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-07-14 17:58:16
- Judged At
- 2025-07-14 17:58:16
- Judged By
- Score
- 5
- Total Time
- 38ms
- Peak Memory
- 536.0 KiB