結果

問題 No.909 たぴの配置
ユーザー brthyyjp
提出日時 2020-04-22 15:25:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 81,664 KB
実行使用メモリ 108,984 KB
最終ジャッジ日時 2024-10-11 07:14:09
合計ジャッジ時間 6,374 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))

ans = 10**18
id = -1
for i in range(n):
    x = X[i]
    y = Y[i]
    if ans >= x+y:
        xm, ym = x, y
        ans = x+y

print(ans)
print(0)
for i in range(n):
    x = X[i]
    y = Y[i]
    if x >= ans and y >= ans:
        print(ans)
    elif x >= ans and y < ans:
        print(ans)
    elif x < ans and y >= ans:
        print(0)
    else:
        if x <= ans:
            print(xm)
        else:
            print(ans-ym)
print(ans)
0