結果
| 問題 | No.3288 Sloppy Land Grading |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2025-10-03 22:18:09 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 289 ms / 2,000 ms |
| + 559µs | |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 243 ms |
| コンパイル使用メモリ | 95,852 KB |
| 実行使用メモリ | 84,992 KB |
| 最終ジャッジ日時 | 2026-07-15 09:52:32 |
| 合計ジャッジ時間 | 5,958 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 |
ソースコード
def solve():
A, B, C, X, Y, Z = map(int, input().split())
xs = sorted([(A, X), (B, Y), (C, Z)])
a, x = xs[0]
b, y = xs[1]
c, z = xs[2]
res = (b-a) * y + (c-a) * z
res = min(res, (b-a) * x + (c-b) * z)
res = min(res, (c-a) * x + (c-b) * y)
return res
INF = 1 << 60
T = int(input())
for _ in range(T):
ans = solve()
print(ans)
norioc