結果

問題 No.2353 Guardian Dogs in Spring
ユーザー titiatitia
提出日時 2023-06-16 21:55:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 1,059 ms
コンパイル使用メモリ 86,768 KB
実行使用メモリ 78,752 KB
最終ジャッジ日時 2023-09-06 19:34:23
合計ジャッジ時間 11,084 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,368 KB
testcase_01 AC 71 ms
71,288 KB
testcase_02 AC 69 ms
71,384 KB
testcase_03 AC 72 ms
70,952 KB
testcase_04 AC 73 ms
71,176 KB
testcase_05 AC 106 ms
78,428 KB
testcase_06 AC 103 ms
78,612 KB
testcase_07 AC 106 ms
78,672 KB
testcase_08 AC 106 ms
78,460 KB
testcase_09 AC 102 ms
78,452 KB
testcase_10 AC 102 ms
78,368 KB
testcase_11 AC 107 ms
78,268 KB
testcase_12 AC 106 ms
78,404 KB
testcase_13 AC 103 ms
78,468 KB
testcase_14 AC 72 ms
71,196 KB
testcase_15 AC 113 ms
78,376 KB
testcase_16 AC 111 ms
78,440 KB
testcase_17 AC 114 ms
78,508 KB
testcase_18 AC 114 ms
78,752 KB
testcase_19 AC 113 ms
78,380 KB
testcase_20 AC 72 ms
71,212 KB
testcase_21 AC 90 ms
76,520 KB
testcase_22 AC 102 ms
77,848 KB
testcase_23 AC 108 ms
78,660 KB
testcase_24 AC 86 ms
76,584 KB
testcase_25 AC 85 ms
76,732 KB
testcase_26 AC 81 ms
76,116 KB
testcase_27 AC 70 ms
71,372 KB
testcase_28 AC 91 ms
76,604 KB
testcase_29 AC 103 ms
78,188 KB
testcase_30 AC 104 ms
78,436 KB
testcase_31 AC 105 ms
78,256 KB
testcase_32 AC 109 ms
78,432 KB
testcase_33 AC 103 ms
78,376 KB
testcase_34 AC 108 ms
78,416 KB
testcase_35 AC 105 ms
78,468 KB
testcase_36 AC 90 ms
76,808 KB
testcase_37 AC 82 ms
76,112 KB
testcase_38 AC 100 ms
78,156 KB
testcase_39 AC 104 ms
78,032 KB
testcase_40 AC 102 ms
78,188 KB
testcase_41 AC 101 ms
78,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

from operator import itemgetter

N=int(input())
P=[list(map(int,input().split()))+[i+1] for i in range(N)]

P.sort(key=itemgetter(0))
P.sort(key=itemgetter(1))

ANS=[]

for i in range(0,N,2):
    if i+1<N:
        ANS.append((P[i][2],P[i+1][2]))

print(len(ANS))
for x,y in ANS:
    print(x,y)
0