当前位置:网站首页>Cf:c. restoring the duration of tasks
Cf:c. restoring the duration of tasks
2022-06-11 18:47:00 【Review of the white speed Dragon King】

analysis
You can get a classification according to the end time of the current task and the start time of the next task
ac code
for _ in range(int(input())):
n = int(input())
s = list(map(int, input().split()))
f = list(map(int, input().split()))
ans = []
for i in range(n):
if i == 0:
ans.append(f[i] - s[i])
else:
if s[i] >= f[i - 1]:
ans.append(f[i] - s[i])
else:
ans.append(f[i] - f[i - 1])
for i in range(len(ans)):
if i != len(ans) - 1:
print(ans[i], end = ' ')
else:
print(ans[i])
summary
Find a regular expert
边栏推荐
- 构造敌方坦克
- Prevent enemy tanks from overlapping
- Labelme for image data annotation
- Let our tanks move happily
- In 2023, the MPAcc of School of management of Xi'an Jiaotong University approved the interview online in advance
- 2022成年礼,致每一位高考学子
- How to manually execute workflow on SAP BTP
- Uni app Muke hot search project (I) production of tabbar
- kubernetes 二进制安装(v1.20.15)(九)收尾:部署几个仪表盘
- 5分钟了解攻防演练中的红蓝紫
猜你喜欢
用户信息管理的功能开发

Introduction to basic use and pit closure of BigDecimal

为何TI的GPMC并口,更常被用于连接FPGA、ADC?我给出3个理由

cf:F. Shifting String【字符串按指定顺序重排 + 分组成环(切割联通分量) + 各组最小相同移动周期 + 最小公倍数】

Force deduction 23 questions, merging K ascending linked lists
Make a static tank

cf:B. Array Decrements【模拟】

Balanced search binary tree -- AVL tree

炫酷的可视化工具:processing 初识

为何TI的GPMC并口,更常被用于连接FPGA、ADC?我给出3个理由
随机推荐
7-3 组合问题(*)
构造敌方坦克
炫酷的可视化工具:processing 初识
kubernetes 二进制安装(v1.20.15)(九)收尾:部署几个仪表盘
Swagger2 easy to use
Function and principle of key in V-for
关于我的 “二进制部署 kubernetes 集群” 的体验
实现可以继续上局
Realize that you can continue to play
uni-app 慕客热搜项目实战(一)tabBar的制作
New project construction environment method
5 minutes to understand the red, blue and purple in the attack and defense drill
MySQL in-depth and complete learning - stage 1 - overview of learning
力扣刷题——二叉树的层序遍历
labelme进行图片数据标注
Prevent enemy tanks from overlapping
Why is ti's GPMC parallel port more often used to connect FPGA and ADC? I give three reasons
On the sequence traversal of binary tree Ⅱ
In 2023, the MPAcc of School of management of Xi'an Jiaotong University approved the interview online in advance
KMP! You deserve it!!! Run directly!