結果
問題 |
No.750 Frac #1
|
ユーザー |
|
提出日時 | 2020-06-04 21:56:52 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 382 bytes |
コンパイル時間 | 1,327 ms |
コンパイル使用メモリ | 79,744 KB |
最終ジャッジ日時 | 2025-01-10 21:21:31 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 7 WA * 23 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> #include<tuple> using namespace std; int main(){ int n;cin>>n; vector<pair<float,float>> ab(n); for(int i=0;i<n;++i)cin>>ab[i].first>>ab[i].second; sort(ab.begin(),ab.end(),[](auto x,auto y){return x.first/x.second<y.first<y.second;}); for(int i=0;i<n;++i)cout<<ab[i].first<<" "<<ab[i].second<<"\n"; }