結果
問題 |
No.1120 Strange Teacher
|
ユーザー |
|
提出日時 | 2022-01-26 20:14:42 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 236 bytes |
コンパイル時間 | 331 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 103,680 KB |
最終ジャッジ日時 | 2024-12-23 14:25:12 |
合計ジャッジ時間 | 4,427 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 6 |
ソースコード
N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) mx = 0 for a, b in zip(A, B): mx = max(mx, a - b) ans = 0 for a, b in zip(A, B): ans += mx - (a - b) print(mx if ans == mx * 2 else -1)