0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-09 02:18:51 +00:00
OI-codes/Luogu/P1897/P1897.cpp

25 lines
415 B
C++
Raw Normal View History

2020-11-17 11:27:36 +00:00
#include <bits/stdc++.h>
using namespace std;
int main() {
2021-11-19 09:01:13 +00:00
int n, a[100005];
2020-11-17 11:27:36 +00:00
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;
}