結果
問題 |
No.2652 [Cherry 6th Tune N] Δρονε χιρχλινγ
|
ユーザー |
![]() |
提出日時 | 2024-02-23 23:08:42 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 479 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 82,420 KB |
実行使用メモリ | 138,624 KB |
最終ジャッジ日時 | 2024-09-29 08:35:00 |
合計ジャッジ時間 | 34,421 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 37 |
ソースコード
import sys input = sys.stdin.readline t=int(input()) for _ in range(t): n,l=map(int,input().split()) M=10000 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)