結果
| 問題 | No.3389 k-Days Later |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-12-14 01:48:04 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 551 bytes |
| 記録 | |
| コンパイル時間 | 272 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 21,544 KB |
| 最終ジャッジ日時 | 2025-12-14 01:48:35 |
| 合計ジャッジ時間 | 26,666 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 22 WA * 6 |
ソースコード
import sys
input = sys.stdin.readline
from bisect import bisect
N=int(input())
D=list(map(int,input().split()))
S=[0]
for d in D:
S.append(S[-1]+d)
Q=int(input())
for tests in range(Q):
y,m,d,k=map(int,input().split())
now=y*S[-1]+S[m-1]+d
now+=k
#print(now)
y=now//S[-1]
now%=S[-1]
x=bisect(S,now)
if now==S[x-1]:
m=x-1
d=now-S[m-1]
if m==0:
y-=1
m=N
print(y,m,d)
else:
m=x
d=now-S[m-1]
print(y,m,d)
titia