0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-24 01:08:47 +00:00

P1897 电梯里的爱情

R42070546
This commit is contained in:
Baoshuo Ren 2020-11-17 19:27:36 +08:00 committed by Baoshuo Ren
parent 33d8e74a50
commit 9f4f85ea72
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

24
problem/P1897/P1897.cpp Normal file
View File

@ -0,0 +1,24 @@
#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;
}