結果
| 問題 |
No.750 Frac #1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-28 23:45:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 388 bytes |
| コンパイル時間 | 2,326 ms |
| コンパイル使用メモリ | 197,016 KB |
| 最終ジャッジ日時 | 2025-01-07 09:51:44 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
pair<double, pair<int, int>> p[n];
while (n--) {
int a, b;
cin >> a >> b;
p[n] = { (double)a / b, { a, b } };
}
sort(p, p+n);
reverse(p, p+n);
for (auto x : p) cout << x.second.first << ' ' << x.second.second << endl;
return 0;
}