开始 2024-08-19 00:00:00

8.19-8.24集训第一天

结束 2024-08-25 23:59:00
Contest is over.
当前 2024-12-22 20:20:45

H题的题解来了!!!!!!!!!!!!!!!!!!!!!!!!!
#include<bits/stdc++.h>
using namespace std;	
long long a[114514];
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		long long c,b;
		cin>>c>>b;
		a[i]=(c*100000)+b;
	}
	sort(a,a+n);
	for(int i=0;i<n;i++){
		long long u=a[i];
		long long b=a[i]%100000;
		a[i]-=b;
		long long c=a[i]/100000;
		cout<<c<<" "<<b<<endl;
	}
	return 0;
}

chenyanhong  •  4个月前

比赛已结束。