結果

問題 No.322 Geometry Dash
ユーザー SSRSSSRS
提出日時 2020-11-27 07:38:43
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 546 bytes
コンパイル時間 788 ms
コンパイル使用メモリ 78,956 KB
実行使用メモリ 5,676 KB
最終ジャッジ日時 2023-10-01 03:57:10
合計ジャッジ時間 6,160 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 41 ms
5,364 KB
testcase_05 AC 47 ms
5,544 KB
testcase_06 AC 49 ms
5,328 KB
testcase_07 AC 51 ms
5,552 KB
testcase_08 AC 53 ms
5,488 KB
testcase_09 AC 48 ms
5,392 KB
testcase_10 AC 48 ms
5,328 KB
testcase_11 AC 49 ms
5,384 KB
testcase_12 AC 51 ms
5,544 KB
testcase_13 AC 53 ms
5,676 KB
testcase_14 AC 49 ms
5,488 KB
testcase_15 AC 50 ms
5,424 KB
testcase_16 AC 52 ms
5,372 KB
testcase_17 AC 54 ms
5,536 KB
testcase_18 AC 55 ms
5,328 KB
testcase_19 AC 51 ms
5,384 KB
testcase_20 AC 52 ms
5,512 KB
testcase_21 AC 53 ms
5,476 KB
testcase_22 AC 55 ms
5,484 KB
testcase_23 AC 56 ms
5,420 KB
testcase_24 AC 53 ms
5,392 KB
testcase_25 AC 53 ms
5,424 KB
testcase_26 AC 55 ms
5,552 KB
testcase_27 AC 56 ms
5,496 KB
testcase_28 AC 57 ms
5,332 KB
testcase_29 AC 52 ms
5,124 KB
testcase_30 AC 55 ms
5,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;
int main(){
	int N;
	cin >> N;
	vector<int> T(N);
	for (int i = 0; i < N; i++){
		cin >> T[i];
	}
	vector<int> D(N);
	for (int i = 0; i < N; i++){
		cin >> D[i];
	}
	vector<pair<double, int>> P(N);
	for (int i = 0; i < N; i++){
		P[i] = make_pair((double) T[i] / D[i], i);
	}
	sort(P.begin(), P.end());
	reverse(P.begin(), P.end());
	for (int i = 0; i < N; i++){
		cout << P[i].second + 1;
		if (i < N - 1){
			cout << ' ';
		}
	}
	cout << endl;
}
0