結果
問題 | No.2353 Guardian Dogs in Spring |
ユーザー |
|
提出日時 | 2023-06-16 23:16:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 74 ms / 2,000 ms |
コード長 | 325 bytes |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 12,672 KB |
最終ジャッジ日時 | 2024-06-24 16:23:25 |
合計ジャッジ時間 | 7,519 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 40 |
ソースコード
N=int(input())Points=[list(map(int,input().split()))+[i+1] for i in range(N)]Points.sort(key=lambda x:x[1])Points.sort(key=lambda x:x[0])res=[]ans=N//2from collections import dequeq=deque(Points)while len(q)>=2:_,_,i=q.popleft()_,_,j=q.popleft()res.append((i,j))print(ans)for c in res:print(*c)