結果
| 問題 |
No.3288 Sloppy Land Grading
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-03 22:44:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 470 ms / 2,000 ms |
| コード長 | 536 bytes |
| コンパイル時間 | 167 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 77,840 KB |
| 最終ジャッジ日時 | 2025-10-03 22:44:32 |
| 合計ジャッジ時間 | 6,772 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 |
ソースコード
import sys
sys.setrecursionlimit(10**7)
def ii(): return int(input())
def mi(d=0): return map(lambda x:int(x)-d,input().split())
INF = float("inf")
MOD = 998244353
def answer(s):
print(s)
exit()
def cross(xy):
x,y = xy
return (x+1,y),(x-1,y),(x,y+1),(x,y-1)
################################################
t = ii()
for _ in range(t):
a,b,c,x,y,z = mi()
ax,by,cz = sorted([(a,x),(b,y),(c,z)])
a,x = ax
b,y = by
c,z = cz
aa = (b-a)*y + (c-a)*z
bb = (b-a)*x + (c-b)*z
cc = (c-a)*x + (c-b)*y
print(min(aa,bb,cc))