結果

問題 No.322 Geometry Dash
ユーザー maimai
提出日時 2016-06-14 15:27:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 815 bytes
コンパイル時間 1,576 ms
コンパイル使用メモリ 169,144 KB
実行使用メモリ 12,032 KB
最終ジャッジ日時 2024-04-26 06:07:57
合計ジャッジ時間 6,856 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 1 ms
6,944 KB
testcase_04 AC 48 ms
11,776 KB
testcase_05 AC 64 ms
11,904 KB
testcase_06 AC 77 ms
11,776 KB
testcase_07 AC 72 ms
11,904 KB
testcase_08 AC 73 ms
11,776 KB
testcase_09 AC 63 ms
11,904 KB
testcase_10 AC 67 ms
11,776 KB
testcase_11 AC 74 ms
11,904 KB
testcase_12 AC 77 ms
11,904 KB
testcase_13 AC 90 ms
11,904 KB
testcase_14 AC 71 ms
11,904 KB
testcase_15 AC 75 ms
11,904 KB
testcase_16 AC 75 ms
11,904 KB
testcase_17 AC 75 ms
11,904 KB
testcase_18 AC 77 ms
11,904 KB
testcase_19 AC 78 ms
11,904 KB
testcase_20 AC 75 ms
12,032 KB
testcase_21 AC 84 ms
11,904 KB
testcase_22 AC 78 ms
12,032 KB
testcase_23 AC 78 ms
11,904 KB
testcase_24 AC 77 ms
11,904 KB
testcase_25 AC 76 ms
11,904 KB
testcase_26 AC 81 ms
11,776 KB
testcase_27 AC 82 ms
11,776 KB
testcase_28 AC 77 ms
11,904 KB
testcase_29 AC 60 ms
10,240 KB
testcase_30 AC 66 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
typedef long long int ll;

int ta[100001];

int calc(vector<int> &l,vector<int> &r){
    return (l[0]/2)*(l[1])+(l[0]+r[0]/2)*(r[1]);
}

int main(){
    int i,j,k,l;
    int x,y,d;
    int m,n;
    
    cin >>n;
    list<vector<int>> stage;
    
    for (i=0;i<n;i++){
        scanf("%d",&j);
        ta[i]=j;
    }
    
    for (i=0;i<n;i++){
        scanf("%d",&j);
        stage.push_back(vector<int>{ta[i],j,i});
    }

    stage.sort([](vector<int> &l,vector<int> &r){return calc(l,r)>calc(r,l);});
    
    int result=0,total=0;
    for (auto it=stage.begin();it!=stage.end();it++){
        cout<<((*it)[2]+1)<<" ";
    }
    cout<<endl;
    
    return 0;
    
}
0