We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2358fb commit f8220b0Copy full SHA for f8220b0
atcoder/abc009/B/main.cpp
@@ -0,0 +1,25 @@
1
+#include <bits/stdc++.h>
2
+
3
+using namespace std;
4
+using ll = int64_t;
5
+using ff = long double;
6
7
+int main() {
8
+ ios_base::sync_with_stdio(false);
9
+ cin.tie(0); cout.tie(0);
10
11
+ int N;
12
+ vector<int> A;
13
14
+ cin >> N;
15
+ A.assign(N, 0);
16
+ for (auto &a : A) cin >> a;
17
18
+ sort(A.begin(), A.end());
19
+ auto it = unique(A.begin(), A.end());
20
+ A.erase(it, A.end());
21
+ reverse(A.begin(), A.end());
22
+ cout << A[1] << endl;
23
24
+ return 0;
25
+}
0 commit comments