結果

問題 No.322 Geometry Dash
ユーザー chocoruskchocorusk
提出日時 2019-05-26 20:38:39
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 510 ms
コンパイル使用メモリ 60,688 KB
実行使用メモリ 4,780 KB
最終ジャッジ日時 2023-10-17 18:03:40
合計ジャッジ時間 10,494 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,780 KB
testcase_01 AC 2 ms
4,780 KB
testcase_02 AC 2 ms
4,780 KB
testcase_03 AC 2 ms
4,780 KB
testcase_04 AC 158 ms
4,780 KB
testcase_05 AC 160 ms
4,780 KB
testcase_06 AC 164 ms
4,780 KB
testcase_07 AC 167 ms
4,780 KB
testcase_08 AC 169 ms
4,780 KB
testcase_09 AC 160 ms
4,780 KB
testcase_10 AC 161 ms
4,780 KB
testcase_11 AC 164 ms
4,780 KB
testcase_12 AC 167 ms
4,780 KB
testcase_13 AC 170 ms
4,780 KB
testcase_14 AC 163 ms
4,780 KB
testcase_15 AC 165 ms
4,780 KB
testcase_16 AC 168 ms
4,780 KB
testcase_17 AC 171 ms
4,780 KB
testcase_18 AC 172 ms
4,780 KB
testcase_19 AC 166 ms
4,780 KB
testcase_20 AC 169 ms
4,780 KB
testcase_21 AC 172 ms
4,780 KB
testcase_22 AC 175 ms
4,780 KB
testcase_23 AC 179 ms
4,780 KB
testcase_24 AC 170 ms
4,780 KB
testcase_25 AC 170 ms
4,780 KB
testcase_26 AC 174 ms
4,780 KB
testcase_27 AC 175 ms
4,780 KB
testcase_28 AC 176 ms
4,780 KB
testcase_29 AC 148 ms
4,780 KB
testcase_30 AC 161 ms
4,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n; cin>>n;
    int t[100010], d[100010], ind[100010];
    for(int i=0; i<n; i++) cin>>t[i], ind[i]=i;
    for(int i=0; i<n; i++) cin>>d[i];
    sort(ind, ind+n, [&](int i, int j){ return d[i]*t[j]<d[j]*t[i];});
    for(int i=0; i<n; i++) cout<<ind[i]+1<<endl;
    return 0;
}
0