結果
| 問題 |
No.750 Frac #1
|
| コンテスト | |
| ユーザー |
xuelei
|
| 提出日時 | 2018-11-09 21:28:44 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 427 bytes |
| コンパイル時間 | 1,550 ms |
| コンパイル使用メモリ | 163,348 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 05:35:28 |
| 合計ジャッジ時間 | 2,485 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
pair<double, pair<int,int>> a[n];
for (int i = 0; i < n; i++) {
cin >> a[i].second.first >> a[i].second.second;
a[i].first = (double)a[i].second.first / a[i].second.second;
}
sort(a, a + n);
reverse(a, a + n);
for (int i = 0; i < n; i++) {
cout << a[i].second.first << " " << a[i].second.second << endl;
}
return 0;
}
xuelei