結果
問題 | No.750 Frac #1 |
ユーザー |
![]() |
提出日時 | 2019-09-06 19:45:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 2,045 ms |
コンパイル使用メモリ | 205,236 KB |
最終ジャッジ日時 | 2025-01-07 16:39:08 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 3 | main(){ | ^~~~
ソースコード
#include<bits/stdc++.h> using namespace std; main(){ int n; cin>>n; using T = tuple<double,int,int>; vector<T> A; for(int i=0;i<n;++i){ double r,a,b; cin>>a>>b; r=a/b; A.emplace_back(r,a,b); } sort(begin(A),end(A),greater<>()); for(int i=0;i<n;++i){ int a,b,c; tie(c,a,b)=A[i]; cout<<a<<" "<<b<<endl; } }