解题思路:
while True: try: s=list(map(int,input().split())) n,m,items=s[0],s[1],s[2:] a=[i for i in items[::2]] b=[i for i in items[1::2]] times=0 windom=[0]*n for i in range(m): dl,fw=a[i],b[i] min_windom=min(windom) chose=windom.index(min_windom) if windom[chose]>dl: times+=windom[chose]-dl windom[chose]=max(dl,windom[chose])+fw ans=times/m print(f"{ans:.2f}") except: break
0.0分
1 人评分
2004年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:1326 |
Pascal三角 (C语言代码)浏览:641 |
JAM计数法 (C语言代码)浏览:665 |
字符串的修改 (C语言代码)浏览:1138 |
C语言训练-求素数问题 (C语言代码)浏览:611 |
A+B for Input-Output Practice (I) (C++代码)浏览:626 |
Manchester-A+B for Input-Output Practice浏览:1779 |
开心的金明浏览:1462 |
【求[X,Y]内被除3余1并且被除5余3的整数的和】 (C语言代码)浏览:506 |
数列有序 (C语言代码)浏览:611 |