結果
| 問題 |
No.904 サメトロ
|
| コンテスト | |
| ユーザー |
toyuzuko
|
| 提出日時 | 2020-04-08 21:42:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 310 bytes |
| コンパイル時間 | 243 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 75,008 KB |
| 最終ジャッジ日時 | 2024-07-19 05:44:52 |
| 合計ジャッジ時間 | 3,259 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 14 |
ソースコード
N = int(input())
A = []
B = []
for _ in range(N - 1):
a, b = map(int, input().split())
A.append(a)
B.append(b)
S = sum(A)
T = sum(B)
res = 0
for i in range(min(S, T) + 1):
p = max(S, T) + i
for j in range(N - 1):
if min(A[j], B[j]) * 2 > p:
break
res += 1
print(res)
toyuzuko