結果
問題 |
No.750 Frac #1
|
ユーザー |
|
提出日時 | 2020-06-07 11:15:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 319 bytes |
コンパイル時間 | 1,804 ms |
コンパイル使用メモリ | 178,252 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 16:32:12 |
合計ジャッジ時間 | 2,766 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) using namespace std; int main(){ vector<tuple<double,int,int>> tp; int n; cin>>n; rep(i,n){ int a,b; cin>>a>>b; tp.emplace_back((double)a/b,a,b); } sort(rbegin(tp),rend(tp)); rep(i,n) cout << get<1>(tp[i]) << " " << get<2>(tp[i]) << endl; }