結果

問題 No.2353 Guardian Dogs in Spring
ユーザー charmychachacha
提出日時 2023-06-17 00:35:00
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 1,820 ms
コンパイル使用メモリ 197,972 KB
最終ジャッジ日時 2025-02-14 21:45:52
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	int N; cin >> N;
	pair<pair<int, int>, int> A[8010];
	for(int i = 0; i < N; i++){
		cin >> A[i].first.first >> A[i].first.second;
		A[i].second = i+1;
	}
	sort(A, A+N);
	cout << N/2 << "\n";
	for(int i = 0; i < N/2; i++) cout << A[i*2].second << " " << A[i*2+1].second << "\n";
}
0