結果
| 問題 | No.1120 Strange Teacher |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-26 20:14:42 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 236 bytes |
| 記録 | |
| コンパイル時間 | 190 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 104,320 KB |
| 最終ジャッジ日時 | 2026-05-29 14:23:42 |
| 合計ジャッジ時間 | 3,937 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)