結果
問題 |
No.2652 [Cherry 6th Tune N] Δρονε χιρχλινγ
|
ユーザー |
![]() |
提出日時 | 2024-02-28 03:08:44 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 616 bytes |
コンパイル時間 | 358 ms |
コンパイル使用メモリ | 81,864 KB |
実行使用メモリ | 118,584 KB |
最終ジャッジ日時 | 2024-09-29 12:17:02 |
合計ジャッジ時間 | 32,703 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 37 |
ソースコード
import sys input = sys.stdin.readline T=int(input()) for tests in range(T): N,L=map(int,input().split()) P=[list(map(int,input().split())) for i in range(N)] c=L/(N**(1/2)) LIST=[[] for i in range(int(L/c+3))] for x,y in P: LIST[int(x/c)].append((x,y)) ANS=[] for i in range(len(LIST)): LIST[i].sort() if i%2==1: LIST[i].reverse() for x,y in LIST[i]: ANS.append((x,y)) print(len(ANS)+1) for x,y in ANS: print(x,y) print(*ANS[0])