結果

問題 No.322 Geometry Dash
ユーザー ayame_pyayame_py
提出日時 2016-01-04 03:53:19
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 499 bytes
コンパイル時間 1,679 ms
コンパイル使用メモリ 162,328 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-26 05:55:15
合計ジャッジ時間 6,343 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 45 ms
6,944 KB
testcase_05 AC 48 ms
6,940 KB
testcase_06 AC 52 ms
6,940 KB
testcase_07 AC 54 ms
6,940 KB
testcase_08 AC 57 ms
6,944 KB
testcase_09 AC 47 ms
6,940 KB
testcase_10 AC 49 ms
6,944 KB
testcase_11 AC 52 ms
6,940 KB
testcase_12 AC 56 ms
6,944 KB
testcase_13 AC 60 ms
6,940 KB
testcase_14 AC 51 ms
6,940 KB
testcase_15 AC 53 ms
6,940 KB
testcase_16 AC 55 ms
6,940 KB
testcase_17 AC 59 ms
6,944 KB
testcase_18 AC 61 ms
6,944 KB
testcase_19 AC 54 ms
6,944 KB
testcase_20 AC 56 ms
6,940 KB
testcase_21 AC 59 ms
6,944 KB
testcase_22 AC 61 ms
6,940 KB
testcase_23 AC 64 ms
6,944 KB
testcase_24 AC 57 ms
6,940 KB
testcase_25 AC 58 ms
6,940 KB
testcase_26 AC 61 ms
6,940 KB
testcase_27 AC 64 ms
6,940 KB
testcase_28 AC 66 ms
6,940 KB
testcase_29 AC 60 ms
6,940 KB
testcase_30 AC 65 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i,n,m) for (int i=n; i<(int)(m); i++)
#define INF 1000000007

int N;
int T[100000],D[100000],v[100000];

bool compare(int x, int y){
    return D[y]*T[x]>D[x]*T[y];
}

int main(){
    cin >> N;
    REP(i,N) cin >> T[i];
    REP(i,N) cin >> D[i];
    REP(i,N) v[i]=i;
    sort(v,v+N,compare);
    cout << v[0]+1;
    FOR(i,1,N) cout << " " << v[i]+1;
    cout << endl;
    
    return 0;
}
0