Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
166799 | 钟佳瑜 | 双关键字排序 | C++ | 运行出错 | 0 | 0 MS | 96 KB | 380 | 2024-08-19 15:23:04 |
#include <iostream> #include<algorithm> using namespace std; long p[10010][10010]; int main(){ int n; cin>>n; long a[n],b[n],am=0,bm=0; for(int i=0;i<n;i++){ cin>>a[i]>>b[i]; if(a[i]>am) am=a[i]; if(b[i]>bm) bm=b[i]; p[a[i]][b[i]]++; } for(int i=0;i<=am;i++){ for(int j=0;j<=bm;j++){ if(p[i][j]!=0) cout<<i<<" "<<j<<endl; } } return 0; }