CF698E.Cron

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

The first line of the input contains six integers ss , mm , hh , dayday , datedate and monthmonth ( 0<=s,m<=590<=s,m<=59 , 0<=h<=230<=h<=23 , 1<=day<=71<=day<=7 , 1<=date<=311<=date<=31 , 1<=month<=121<=month<=12 ). Each of the number can also be equal to 1-1 . It's guaranteed, that there are infinitely many moments of time when this task should be executed.

Next line contains the only integer nn ( 1<=n<=10001<=n<=1000 ) — the number of moments of time you have to solve the problem for. Each of the next nn lines contains a single integer tit_{i} ( 0<=ti<=10120<=t_{i}<=10^{12} ).

输入格式

Print nn lines, the ii -th of them should contain the first moment of time strictly greater than tit_{i} , when the task should be executed.

输出格式

The moment of time 14673726581467372658 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 14673726581467372658 after the midnight of January 1st, 1970 is 11:30:58 July 1st, 2016.

首页