結果
| 問題 | No.750 Frac #1 |
| コンテスト | |
| ユーザー |
Yut176
|
| 提出日時 | 2019-06-06 02:07:53 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 438µs | |
| コード長 | 627 bytes |
| 記録 | |
| コンパイル時間 | 535 ms |
| コンパイル使用メモリ | 110,348 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-09-02 15:52:29 |
| 合計ジャッジ時間 | 2,699 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
using namespace std;
long long mod = 1e9 + 7;
bool comp(pair<int, int> l, pair<int,int> r) {
return (l.first * r.second) > (l.second * r.first);
}
int main(void) {
int n; cin >> n;
vector<pair<int,int>> p(n);
for(int i=0; i<n; i++) cin >> p[i].first >> p[i].second;
sort(p.begin(), p.end(), comp);
for(int i=0; i<n; i++) {
cout << p[i].first << " " << p[i].second << endl;
}
return 0;
}
// EOF
Yut176