結果
| 問題 |
No.2465 Dilated Water Simulation
|
| コンテスト | |
| ユーザー |
gbrsofy
|
| 提出日時 | 2023-11-02 18:24:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 844 bytes |
| コンパイル時間 | 349 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 32,980 KB |
| 最終ジャッジ日時 | 2024-09-25 18:15:29 |
| 合計ジャッジ時間 | 23,480 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 WA * 23 |
ソースコード
# coding: utf-8
# Your code here!
s = int(input())
t = input().split(" ")
u = int(input())
a = u % s
b = u // s
res = [0]*s
res_t=[0]*s
res[0]=int(t[0])
for x in range(b):
for i in range(s):
t_a = int(t[i])
t_b = int(t[(i+1)%s])
if t_a > t_b:
res[i]=res[i]-(t_b - res[(i+1)%s])
res[(i+1)%s]=t_b
else:
res[(i+1)%s]=res[i]+res[(i+1)%s]
res[i]=0
#print(res,res_t)
if res_t == res:
break
res_t = res
#print(res)
if a !=0:
for i in range(a):
t_a = int(t[i])
t_b = int(t[(i+1)%s])
if t_a > t_b:
res[i]=res[i]-(t_b - res[(i+1)%s])
res[(i+1)%s]=t_b
else:
res[(i+1)%s]=res[i]+res[(i+1)%s]
res[i]=0
#print(res)
print(*res)
gbrsofy