結果
| 問題 |
No.2213 Neq Move
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-12 22:31:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 590 bytes |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 61,568 KB |
| 最終ジャッジ日時 | 2024-07-07 15:07:07 |
| 合計ジャッジ時間 | 923 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 5 |
ソースコード
import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353
def solve():
a, b, c, d = mi()
if a > b:
a, b = b, a
c, d = d, c
ta = False
tb = False
if a >= c:
ta = True
if b >= d:
tb = True
if c > d:
tb = True
ans = 0
if ta:
ans += 1 + c
else:
ans += c - a
if tb:
ans += 1 + d
else:
ans += d - b
print(ans)
for _ in range(ii()):
solve()