文章
12
粉丝
319
获赞
10
访问
132.0k
#include <stdio.h>
int main()
{
int T = 0, n = 0, time = 0, last = 1, now = 0; //last为前一楼层,now为当前楼层
scanf("%d", &T);
scanf("%d", &n);
while (T--)
{
while (n--)
{
scanf("%d", &now);
if (now - last > 0)
time += (now - last) * 6 + 3;
else if (now - last == 0)
time += 3;
else
time += (last - now) *...
登录后发布评论
暂无评论,来抢沙发