結果

問題 No.2843 Birthday Present Struggle
ユーザー Basin-BugBasin-Bug
提出日時 2024-08-24 12:59:28
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 746 bytes
コンパイル時間 327 ms
コンパイル使用メモリ 82,596 KB
実行使用メモリ 69,240 KB
最終ジャッジ日時 2024-08-24 12:59:35
合計ジャッジ時間 6,710 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,728 KB
testcase_01 AC 37 ms
52,400 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 WA -
testcase_09 RE -
testcase_10 WA -
testcase_11 WA -
testcase_12 RE -
testcase_13 RE -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 38 ms
54,092 KB
testcase_30 RE -
testcase_31 RE -
testcase_32 AC 48 ms
63,348 KB
testcase_33 AC 47 ms
63,556 KB
testcase_34 RE -
testcase_35 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ax, ay = map(int, input().split())
bx, by = map(int, input().split())
cx, cy = map(int, input().split())

if bx <= ax < cx:
  print(N)
  for i in range(1, N + 1):
    print(ax + 1, i)
elif cx < ax <= bx:
  print(N)
  for i in range(1, N + 1):
  	print(ai - 1, i)
elif by <= ay < cy:
  print(N)
  for i in range(1, N + 1):
    print(i, ay + 1)
elif cy < ay <= by:
  print(N)
  for i in range(1, N + 1):
    print(i, ay - 1)
else:
  minx = min(ax, bx)
  miny = min(ay, by)
  maxx = max(ax, bx)
  maxy = max(ay, by)
  print((maxy - miny + 3 + maxx - minx + 3) * 2)
  for i in range(minx - 1, maxx + 2):
    print(i, miny - 1)
    print(i, maxy + 1)
  for i in range(miny - 1, maxy + 2):
    print(minx - 1, i)
    print(maxx + 1, y)
0