結果

問題 No.322 Geometry Dash
ユーザー face4face4
提出日時 2019-02-12 13:42:39
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 451 bytes
コンパイル時間 758 ms
コンパイル使用メモリ 79,852 KB
実行使用メモリ 6,956 KB
最終ジャッジ日時 2023-10-11 10:53:33
合計ジャッジ時間 8,343 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 64 ms
6,852 KB
testcase_05 AC 72 ms
6,752 KB
testcase_06 AC 74 ms
6,872 KB
testcase_07 AC 76 ms
6,848 KB
testcase_08 AC 79 ms
6,808 KB
testcase_09 AC 71 ms
6,844 KB
testcase_10 AC 73 ms
6,812 KB
testcase_11 AC 76 ms
6,760 KB
testcase_12 AC 76 ms
6,944 KB
testcase_13 AC 79 ms
6,812 KB
testcase_14 AC 75 ms
6,732 KB
testcase_15 AC 76 ms
6,736 KB
testcase_16 AC 77 ms
6,816 KB
testcase_17 AC 80 ms
6,820 KB
testcase_18 AC 80 ms
6,804 KB
testcase_19 AC 77 ms
6,792 KB
testcase_20 AC 77 ms
6,864 KB
testcase_21 AC 79 ms
6,936 KB
testcase_22 AC 81 ms
6,956 KB
testcase_23 AC 82 ms
6,756 KB
testcase_24 AC 78 ms
6,932 KB
testcase_25 AC 78 ms
6,756 KB
testcase_26 AC 81 ms
6,940 KB
testcase_27 AC 83 ms
6,856 KB
testcase_28 AC 84 ms
6,952 KB
testcase_29 AC 73 ms
6,624 KB
testcase_30 AC 79 ms
6,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
    int n;
    cin >> n;
    vector<pair<double, int>> v;
    vector<double> t(n), d(n);
    for(int i = 0; i < n; i++)  cin >> t[i];
    for(int i = 0; i < n; i++)  cin >> d[i];
    for(int i = 0; i < n; i++)  v.push_back({t[i]/d[i], i+1});
    sort(v.rbegin(), v.rend());
    for(int i = 0; i < n; i++)  cout << v[i].second << " \n"[i == n-1];
    return 0;
}
0