結果
問題 | No.1935 Water Simulation |
ユーザー |
![]() |
提出日時 | 2022-05-13 22:17:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 416 bytes |
コンパイル時間 | 379 ms |
コンパイル使用メモリ | 82,076 KB |
実行使用メモリ | 54,100 KB |
最終ジャッジ日時 | 2024-07-22 02:16:22 |
合計ジャッジ時間 | 2,451 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 4 |
ソースコード
V1,V2,V3,V4,N=map(int,input().split())V=(V1,V2,V3,V4)s=[V1,0,0,0]st = {tuple(s):0}ts = [tuple(s)]i=0cnt=0while N>0:N-=1cnt+=1v=s[i]ib=ii+=1if i>3:i=0nxt=s[i]c=V[i]d=min(c-nxt,v)s[i]+=ds[ib]-=dt = tuple(s)if t in st:l=st[t]loop=cnt-lN%=loops = ts[l+N]breakst[t]=cntts.append(t)print(*s)