CF 254B(日期)
来源:互联网 发布:搜索引擎优化bwysj 编辑:程序博客网 时间:2024/05/16 19:14
直接模拟,注意日期换算。
Program jury;var n,i,j,m,d,p,t,ans:longint; month:array[1..12] of longint=(31,28,31,30,31,30,31,31,30,31,30,31); a:array[-1000..1000] of longint;begin assign(input,'input.txt'); assign(output,'output.txt'); reset(input); rewrite(output); read(n); fillchar(a,sizeof(a),0); for i:=1 to n do begin read(m,d,p,t); for j:=1 to m-1 do inc(d,month[j]); for j:=d-1 downto d-t do inc(a[j],p); end; ans:=0; for i:=-1000 to 1000 do if ans<a[i] then ans:=a[i]; writeln(ans); close(input); close(output);end.
- CF 254B(日期)
- CF 304B(Calendar-一段时间的日期)
- CF#254 (Div. 2) B.
- cf-B
- cf B
- CF 1B Spreadsheet
- CF 3B Lorry
- CF 176B
- CF 91B
- cf 131 DIV2 B
- CF 113B || CF196D
- CF 126B
- CF-236B
- cf 79B
- CF - 158B - Taxi
- CF 296B
- CF 173(div2) B
- cf:B-QR code
- 使用CGLIB实现AOP功能与AOP概念解释
- 快速排序,好像不是很懂
- error: expected class-name before ‘{’ token
- 关掉Ctrl+Alt+↓(方向键)转屏功能
- 透析WINCE的控制面板
- CF 254B(日期)
- source insight的配置
- 杭电OJ题 1040 As Easy As A+B 解题报告
- Tabular: 在 Vim 中对齐文本
- 详解WINCE的控制面板
- linux input 设备的测试函数
- 指针赋值与指针传递
- android网络应用2——URLConnection
- 熟悉struts2MVC模式之用属性驱动传参例子