結果
問題 | No.750 Frac #1 |
ユーザー |
|
提出日時 | 2022-06-01 15:56:43 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 322 bytes |
コンパイル時間 | 1,036 ms |
コンパイル使用メモリ | 92,948 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 01:31:59 |
合計ジャッジ時間 | 2,079 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include<iostream> #include<algorithm> #include<utility> using namespace std; int main(){ int n; cin>>n; pair<double,pair<int,int>>arr[10]; for(int i=0;i<n;i++){ int a,b; cin>>a>>b; arr[i]={-1.*a/b,{a,b}}; } sort(arr,arr+n); for(int i=0;i<n;i++) cout<<arr[i].second.first<<' '<<arr[i].second.second<<endl; }