A10538 | Cron
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
The first line of the input contains six integers $s$ , $m$ , $h$ , $day$ , $date$ and $month$ ( $0<=s,m<=59$ , $0<=h<=23$ , $1<=day<=7$ , $1<=date<=31$ , $1<=month<=12$ ). Each of the number can also be equal to $-1$ . It's guaranteed, that there are infinitely many moments of time when this task should be executed.
Next line contains the only integer $n$ ( $1<=n<=1000$ ) — the number of moments of time you have to solve the problem for. Each of the next $n$ lines contains a single integer $t_{i}$ ( $0<=t_{i}<=10^{12}$ ).
Next line contains the only integer $n$ ( $1<=n<=1000$ ) — the number of moments of time you have to solve the problem for. Each of the next $n$ lines contains a single integer $t_{i}$ ( $0<=t_{i}<=10^{12}$ ).
输入格式
Print $n$ lines, the $i$ -th of them should contain the first moment of time strictly greater than $t_{i}$ , when the task should be executed.
输出格式
The moment of time $1467372658$ after the midnight of January 1st, 1970 is 11:30:58 July 1st, 2016.
输入输出样例
输入 #1
-1 59 23 -1 -1 -1 6 1467372658 1467417540 1467417541 1467417598 1467417599 1467417600
输出 #1
1467417540 1467417541 1467417542 1467417599 1467503940 1467503940
输入 #2
0 0 12 6 3 7 3 1467372658 1467460810 1467547200
输出 #2
1467460800 1467547200 1468065600
The moment of time $1467372658$ after the midnight of January 1st, 1970 is 11:30:58 July 1st, 2016.
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted