結果
| 問題 | No.750 Frac #1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-22 00:37:08 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 413µs | |
| コード長 | 420 bytes |
| 記録 | |
| コンパイル時間 | 1,714 ms |
| コンパイル使用メモリ | 183,888 KB |
| 実行使用メモリ | 9,868 KB |
| 最終ジャッジ日時 | 2026-09-22 00:37:12 |
| 合計ジャッジ時間 | 3,279 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
using P = pair<int, int>;
int main(void){
int n; cin >> n;
vector<P> ans;
for(int i=0; i<n; i++){
int a, b; cin >> a >> b;
ans.emplace_back(a, b);
}
sort(begin(ans), end(ans), [](const P& a, const P& b){
return a.first*b.second>a.second*b.first;
});
for(auto [a, b]:ans) cout << a << ' ' << b << endl;
return 0;
}