#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
int n;
scanf("%d",&n);
int time = 0;
int t = 0;
int now = 0;
for(int i = 1;i<=n;i++){
scanf("%d",&t);
if(t>=now){
time += (t-now)*6+5;
}
if(t<now){
time +=(now-t)*4+5;
}
now = t;
}
printf("%d\n",time);
return 0;
}
A1008 Elevator
最新推荐文章于 2022-11-13 18:09:59 发布