結果

問題 No.322 Geometry Dash
ユーザー ShibuyapShibuyap
提出日時 2020-01-28 00:39:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 741 bytes
コンパイル時間 1,771 ms
コンパイル使用メモリ 172,596 KB
実行使用メモリ 6,964 KB
最終ジャッジ日時 2023-10-12 18:25:45
合計ジャッジ時間 9,145 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 64 ms
6,812 KB
testcase_05 AC 70 ms
6,952 KB
testcase_06 AC 74 ms
6,700 KB
testcase_07 AC 76 ms
6,720 KB
testcase_08 AC 78 ms
6,804 KB
testcase_09 AC 71 ms
6,760 KB
testcase_10 AC 72 ms
6,944 KB
testcase_11 AC 75 ms
6,776 KB
testcase_12 AC 76 ms
6,796 KB
testcase_13 AC 79 ms
6,656 KB
testcase_14 AC 74 ms
6,724 KB
testcase_15 AC 74 ms
6,656 KB
testcase_16 AC 76 ms
6,852 KB
testcase_17 AC 78 ms
6,704 KB
testcase_18 AC 80 ms
6,732 KB
testcase_19 AC 76 ms
6,884 KB
testcase_20 AC 76 ms
6,760 KB
testcase_21 AC 78 ms
6,712 KB
testcase_22 AC 80 ms
6,704 KB
testcase_23 AC 82 ms
6,964 KB
testcase_24 AC 79 ms
6,708 KB
testcase_25 AC 77 ms
6,856 KB
testcase_26 AC 81 ms
6,868 KB
testcase_27 AC 82 ms
6,644 KB
testcase_28 AC 83 ms
6,796 KB
testcase_29 AC 72 ms
6,600 KB
testcase_30 AC 80 ms
6,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int main() {
    int n;
    cin >> n;
    double t[n], d[n];
    rep(i,n)cin >> t[i];
    rep(i,n)cin >> d[i];

    vector<pair<double,int>> v;
    rep(i,n){
        pair<double,int> p;
        p.first = d[i] / t[i];
        p.second = i + 1;
        v.push_back(p);
    }
    sort(v.begin(), v.end());

    rep(i,n){
        cout << v[i].second;
        if(i != n - 1)cout << ' ';
        else cout << endl;
    }
    return 0;
}
 
 
0