Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
191012 | 赵德明 | 双关键字排序 | C++ | 解答错误 | 0 | 0 MS | 260 KB | 360 | 2025-02-15 14:26:32 |
#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; }