結果
問題 | No.750 Frac #1 |
ユーザー |
![]() |
提出日時 | 2019-07-09 21:20:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 510 bytes |
コンパイル時間 | 1,450 ms |
コンパイル使用メモリ | 163,448 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 16:45:54 |
合計ジャッジ時間 | 2,357 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ struct x { double A; double B; }; int n; cin >> n; vector<x> y(n); for(int i =0; i < n; i++){ cin >> y.at(i).A >> y.at(i).B; } sort(y.begin(),y.end(), [](const x& s, const x& t) {return s.A/s.B > t.A/t.B;}); for(int i =0; i < n; i++){ cout << y.at(i).A << " " << y.at(i).B << endl; } }