結果
| 問題 | No.178 美しいWhitespace (1) |
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 15:22:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 462 bytes |
| 記録 | |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 95,212 KB |
| 実行使用メモリ | 82,816 KB |
| 最終ジャッジ日時 | 2026-07-11 14:17:38 |
| 合計ジャッジ時間 | 3,573 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | MLE * 4 |
| other | MLE * 21 |
ソースコード
n = int(input())
base = []
for _ in range(n):
a, b = map(int, input().split())
base_i = a + 4 * b
base.append(base_i)
# Check if all base_i have the same parity
par = base[0] % 2
possible = True
for num in base[1:]:
if num % 2 != par:
possible = False
break
if not possible:
print(-1)
else:
max_base = max(base)
total = 0
for num in base:
diff = max_base - num
total += diff // 2
print(total)
gew1fw