結果
| 問題 |
No.750 Frac #1
|
| コンテスト | |
| ユーザー |
cureskol
|
| 提出日時 | 2020-03-20 23:03:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 339 bytes |
| コンパイル時間 | 1,812 ms |
| コンパイル使用メモリ | 174,100 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-15 08:10:11 |
| 合計ジャッジ時間 | 2,746 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
bool cmp(P a,P b){
return a.first*b.second>a.second*b.first;
}
signed main(){
int n;cin>>n;
vector<P> a(n);
for(int i=0;i<n;i++){int u,v;cin>>u>>v;a[i]=P(u,v);}
sort(a.begin(),a.end(),cmp);
for(int i=0;i<n;i++)cout<<a[i].first<<" "<<a[i].second<<endl;
}
cureskol