Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
99816 | 赵德明 | 双关键字排序 | C++ | 通过 | 100 | 35 MS | 2072 KB | 441 | 2023-08-23 21:23:24 |
using namespace std; struct asd{ int a,b; bool operator < (const asd &o)const{ if(a!=o.a) return a>o.a; else return b>o.b; } }; int main(){ int a,x,y; cin>>a; asd temp; priority_queue<asd> n; for(int i=1;i<=a;i++){ scanf("%d%d",&x,&y); temp.a=x; temp.b=y; n.push(temp); } while(!n.empty()){ temp=n.top(); n.pop(); printf("%d %d\n",temp.a,temp.b); } return 0; }
exit code: 0, checker exit code: 0
exit code: 0, checker exit code: 0
exit code: 0, checker exit code: 0
exit code: 0, checker exit code: 0
exit code: 0, checker exit code: 0