結果

問題 No.322 Geometry Dash
ユーザー roarisroaris
提出日時 2019-12-11 23:33:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 589 bytes
コンパイル時間 1,587 ms
コンパイル使用メモリ 174,580 KB
実行使用メモリ 5,704 KB
最終ジャッジ日時 2023-09-06 13:34:16
合計ジャッジ時間 8,549 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 42 ms
5,416 KB
testcase_05 AC 43 ms
5,512 KB
testcase_06 AC 47 ms
5,368 KB
testcase_07 AC 49 ms
5,448 KB
testcase_08 AC 51 ms
5,484 KB
testcase_09 AC 43 ms
5,368 KB
testcase_10 AC 44 ms
5,456 KB
testcase_11 AC 47 ms
5,556 KB
testcase_12 AC 49 ms
5,576 KB
testcase_13 AC 52 ms
5,508 KB
testcase_14 AC 46 ms
5,448 KB
testcase_15 AC 47 ms
5,452 KB
testcase_16 AC 50 ms
5,512 KB
testcase_17 AC 53 ms
5,576 KB
testcase_18 AC 54 ms
5,432 KB
testcase_19 AC 48 ms
5,492 KB
testcase_20 AC 50 ms
5,420 KB
testcase_21 AC 53 ms
5,704 KB
testcase_22 AC 55 ms
5,420 KB
testcase_23 AC 57 ms
5,572 KB
testcase_24 AC 51 ms
5,448 KB
testcase_25 AC 51 ms
5,484 KB
testcase_26 AC 55 ms
5,572 KB
testcase_27 AC 57 ms
5,508 KB
testcase_28 AC 58 ms
5,372 KB
testcase_29 AC 54 ms
5,412 KB
testcase_30 AC 58 ms
5,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef tuple<int, int, int> T;

int main() {
    int N; cin >> N;
    int t[N], d[N];
    
    for (int i=0; i<N; i++) cin >> t[i];
    for (int i=0; i<N; i++) cin >> d[i];
    
    vector<T> TD;
    
    for (int i=0; i<N; i++) {
        TD.push_back(make_tuple(i, t[i], d[i]));
    }
    
    sort(TD.begin(), TD.end(), [](const auto &lhs, const auto &rhs) {return get<1>(lhs)*get<2>(rhs)>get<1>(rhs)*get<2>(lhs);});
    
    for (int i=0; i<N-1; i++) {
        cout << get<0>(TD[i])+1 << " ";
    }
    cout << get<0>(TD[N-1])+1 << endl;
}
0