0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-24 21:28:48 +00:00
OI-codes/Luogu/problem/P1897/P1897.cpp

25 lines
422 B
C++
Raw Normal View History

2020-11-17 11:27:36 +00:00
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a[100005];
queue<int> q;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
int h, s, t;
h = a[n - 1];
s = unique(a, a + n) - a;
t = h * (4 + 6) + n;
for (int i = 0; i < s; i++) {
if (a[i]) {
t += 5;
}
}
cout << t << endl;
return 0;
}