結果

問題 No.2652 [Cherry 6th Tune N] Δρονε χιρχλινγ
ユーザー tassei903tassei903
提出日時 2024-02-23 22:30:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,603 ms / 2,000 ms
コード長 694 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 134,288 KB
最終ジャッジ日時 2024-02-23 22:31:35
合計ジャッジ時間 75,794 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 546 ms
80,896 KB
testcase_02 AC 536 ms
81,148 KB
testcase_03 AC 577 ms
82,560 KB
testcase_04 AC 849 ms
113,288 KB
testcase_05 AC 895 ms
113,804 KB
testcase_06 AC 908 ms
117,872 KB
testcase_07 AC 1,225 ms
126,912 KB
testcase_08 AC 1,246 ms
124,604 KB
testcase_09 AC 1,352 ms
126,096 KB
testcase_10 AC 1,291 ms
127,056 KB
testcase_11 AC 1,293 ms
127,776 KB
testcase_12 AC 1,240 ms
126,004 KB
testcase_13 AC 1,415 ms
128,476 KB
testcase_14 AC 1,571 ms
134,288 KB
testcase_15 AC 1,384 ms
128,796 KB
testcase_16 AC 1,234 ms
127,036 KB
testcase_17 AC 1,318 ms
128,660 KB
testcase_18 AC 1,435 ms
128,940 KB
testcase_19 AC 1,369 ms
128,916 KB
testcase_20 AC 1,556 ms
133,332 KB
testcase_21 AC 1,579 ms
133,564 KB
testcase_22 AC 1,603 ms
133,200 KB
testcase_23 AC 1,567 ms
133,452 KB
testcase_24 AC 1,552 ms
133,068 KB
testcase_25 AC 1,564 ms
133,180 KB
testcase_26 AC 1,548 ms
133,524 KB
testcase_27 AC 1,544 ms
133,376 KB
testcase_28 AC 1,568 ms
133,196 KB
testcase_29 AC 1,556 ms
133,048 KB
testcase_30 AC 1,571 ms
134,280 KB
testcase_31 AC 1,572 ms
133,304 KB
testcase_32 AC 1,536 ms
133,824 KB
testcase_33 AC 1,542 ms
133,820 KB
testcase_34 AC 1,559 ms
133,560 KB
testcase_35 AC 1,569 ms
133,892 KB
testcase_36 AC 1,565 ms
133,436 KB
testcase_37 AC 1,550 ms
133,896 KB
testcase_38 AC 1,564 ms
133,768 KB
testcase_39 AC 1,581 ms
133,048 KB
testcase_40 AC 623 ms
132,188 KB
testcase_41 AC 586 ms
131,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes")
no = lambda :print("no");No = lambda :print("No")
#######################################################################
b = 500
def dist(a, b):
    return abs(a[0] - b[0]) + abs(a[1] - b[1])

for _ in range(ni()):
    n, l = na()
    l += 1
    p = []
    for i in range(n):
        x, y = na()
        p.append([x*b//l,[y if (x*b//l)%2 else -y] , x, y])
    p = sorted(p)
    print(n)
    s = 0
    for i in range(n):
        s += dist(p[i][2:], p[(i+1)%n][2:])
        print(*p[i][2:])
    assert s <= 1000*(l-1)
0