結果
| 問題 | No.3679 なんかでっかい虫リターンズ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-05 13:15:38 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
AC
|
| 実行時間 | 62 ms / 2,000 ms |
| + 738µs | |
| コード長 | 265 bytes |
| 記録 | |
| コンパイル時間 | 221 ms |
| コンパイル使用メモリ | 96,076 KB |
| 実行使用メモリ | 83,320 KB |
| 最終ジャッジ日時 | 2026-09-05 13:15:41 |
| 合計ジャッジ時間 | 2,905 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
h,w=map(int,input().split()) a,b=map(int,input().split()) r1,c1,r2,c2=map(int,input().split()) p,q=map(int,input().split()) ans=10**18 for i in range(r1,r2+1): for j in range(c1,c2+1): ans=min(ans,abs(i-a)+abs(j-b)+abs(i-p)+abs(j-q)+abs(a-p)+abs(b-q)) print(ans)