結果
問題 | No.750 Frac #1 |
ユーザー |
![]() |
提出日時 | 2019-09-29 23:40:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 375 bytes |
コンパイル時間 | 1,676 ms |
コンパイル使用メモリ | 174,996 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-03 04:44:01 |
合計ジャッジ時間 | 2,696 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; int main(){ int n; cin >> n; tuple<double, int, int> t[n]; for(int i=0; i<n; i++){ int a, b; cin >> a >> b; t[i]=make_tuple((double)(a)/b, a, b); } sort(t, t+n); for(int i=n-1; i>=0; i--){ cout << get<1>(t[i]) << " " << get<2>(t[i]) << endl; } return 0; }