結果
| 問題 |
No.2353 Guardian Dogs in Spring
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-16 22:07:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 106 ms / 2,000 ms |
| コード長 | 354 bytes |
| コンパイル時間 | 279 ms |
| コンパイル使用メモリ | 82,440 KB |
| 実行使用メモリ | 79,328 KB |
| 最終ジャッジ日時 | 2024-06-24 14:26:58 |
| 合計ジャッジ時間 | 8,446 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 40 |
ソースコード
from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline
N = int(input())
XY = [tuple(map(int,input().split())) for _ in range(N)]
pos = {y:i for i,y in enumerate(XY)}
XY.sort()
print(N//2)
for i in range(0,N-1,2):
x = XY[i]
y = XY[i+1]
print(pos[x]+1,pos[y]+1)