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:
parent
33d8e74a50
commit
9f4f85ea72
24
problem/P1897/P1897.cpp
Normal file
24
problem/P1897/P1897.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user