結果
問題 | No.322 Geometry Dash |
ユーザー |
![]() |
提出日時 | 2015-12-15 13:36:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 90 ms / 2,000 ms |
コード長 | 524 bytes |
コンパイル時間 | 2,513 ms |
コンパイル使用メモリ | 166,252 KB |
実行使用メモリ | 9,600 KB |
最終ジャッジ日時 | 2024-11-08 17:36:14 |
合計ジャッジ時間 | 7,645 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h>#define REP(i,n) for(int i=0;i<(int)(n);i++)#define ALL(x) (x).begin(),(x).end()using namespace std;typedef long long ll;typedef long double ld;const ld eps = 1e-9, pi = acos(-1.0);int main() {int N;cin >> N;vector<ld> T(N), D(N);REP(i,N) cin >> T[i];REP(i,N) cin >> D[i];vector<pair<ld,int>> vec(N);REP(i,N) vec[i] = make_pair(D[i] / T[i], i+1);sort(ALL(vec));REP(i,N) {if (i > 0) cout << " ";cout << vec[i].second;}cout << endl;return 0;}