結果
問題 |
No.1935 Water Simulation
|
ユーザー |
|
提出日時 | 2022-05-13 21:59:32 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 496 bytes |
コンパイル時間 | 642 ms |
コンパイル使用メモリ | 82,260 KB |
実行使用メモリ | 67,136 KB |
最終ジャッジ日時 | 2024-07-22 01:47:22 |
合計ジャッジ時間 | 3,849 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 1 TLE * 1 -- * 27 |
ソースコード
import sys sys.setrecursionlimit(10 ** 7) def get_list(ty=int): return list(map(ty, input().split())) def get_int(): return int(input()) def get_str(): return input() V1, V2, V3, V4, N = get_list() V = [V1, V2, V3, V4] def gutyoku(V): C = [0] * 4 C[0] = V[0] for n in range(N): a = n % 4 b = (n + 1) % 4 diff = min(V[b] - C[b], C[a]) C[a] -= diff C[b] += diff return C print(" ".join(str(c) for c in gutyoku(V)))