結果
| 問題 |
No.750 Frac #1
|
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2018-11-10 08:08:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 616 bytes |
| コンパイル時間 | 1,985 ms |
| コンパイル使用メモリ | 97,312 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 08:31:54 |
| 合計ジャッジ時間 | 2,190 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <random>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int main()
{
P p[10];
int n; cin>>n;
for(int i=0; i<n; i++){
int a, b;
cin>>a>>b;
p[i]=P(a, b);
}
sort(p, p+n, [&](P x, P y){ return x.first*y.second>x.second*y.first; });
for(int i=0; i<n; i++){
cout<<p[i].first<<" "<<p[i].second<<endl;
}
return 0;
}
chocorusk