Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
signed main() {
ios_base::sync_with_stdio(0); cin.tie(0);
int tc; cin >> tc;
test:
while (tc--) {
ll n; cin >> n;
ll arr[n];
for (auto &u : arr) cin >> u;
sort(arr, arr+n);
// ll ans = -1e18;
// for (ll i = 1; i < n; i++) ans = max(ans, arr[i]-arr[i-1]);
cout << arr[n-1]-arr[n-2] << "\n";
}
}
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 16:21:34
- Judged At
- 2025-07-14 16:21:34
- Judged By
- Score
- 5
- Total Time
- 14ms
- Peak Memory
- 536.0 KiB