結果
問題 | No.909 たぴの配置 |
ユーザー |
![]() |
提出日時 | 2020-04-22 15:31:24 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 185 ms / 3,000 ms |
コード長 | 529 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 109,252 KB |
最終ジャッジ日時 | 2024-10-11 07:14:46 |
合計ジャッジ時間 | 4,390 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
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 <= xm: print(x) else: print(ans-y) print(ans)