Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
191013 | 赵德明 | 双关键字排序 | C++ | 运行超时 | 80 | 1000 MS | 1028 KB | 361 | 2025-02-15 14:27:07 |
#include<bits/stdc++.h> using namespace std; struct dui{ int a,b; bool operator < (const dui &o)const{ if(a!=o.a) return a<o.a; else return b<o.b; } }m[1000005]; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>m[i].a>>m[i].b; } sort(m+1,m+n+1); for(int i=1;i<=n;i++){ cout<<m[i].a<<" "<<m[i].b<<endl; } return 0; }