結果
問題 |
No.2652 [Cherry 6th Tune N] Δρονε χιρχλινγ
|
ユーザー |
![]() |
提出日時 | 2024-02-23 23:07:09 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 478 bytes |
コンパイル時間 | 515 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 102,656 KB |
最終ジャッジ日時 | 2024-09-29 08:31:48 |
合計ジャッジ時間 | 36,891 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 WA * 13 |
ソースコード
import sys input = sys.stdin.readline t=int(input()) for _ in range(t): n,l=map(int,input().split()) M=1000 bucket=[[] for i in range(M)] for i in range(n): x,y=map(int,input().split()) bucket[x*M//(10**9+1)].append((x,y)) for i in range(M): if i&1: bucket[i].sort(key=lambda x:-x[1]) else: bucket[i].sort(key=lambda x:x[1]) ans=[] for i in range(M): for j in bucket[i]: ans.append(j) print(n) for i in ans: print(*i)