結果

問題 No.322 Geometry Dash
ユーザー かにかに
提出日時 2015-12-17 18:04:52
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 929 bytes
コンパイル時間 1,193 ms
コンパイル使用メモリ 149,072 KB
実行使用メモリ 4,800 KB
最終ジャッジ日時 2023-08-08 12:51:58
合計ジャッジ時間 6,349 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 40 ms
4,596 KB
testcase_05 AC 43 ms
4,508 KB
testcase_06 AC 46 ms
4,540 KB
testcase_07 AC 49 ms
4,744 KB
testcase_08 AC 52 ms
4,620 KB
testcase_09 AC 43 ms
4,540 KB
testcase_10 AC 44 ms
4,548 KB
testcase_11 AC 47 ms
4,800 KB
testcase_12 AC 50 ms
4,652 KB
testcase_13 AC 54 ms
4,636 KB
testcase_14 AC 46 ms
4,744 KB
testcase_15 AC 48 ms
4,504 KB
testcase_16 AC 49 ms
4,748 KB
testcase_17 AC 53 ms
4,792 KB
testcase_18 AC 57 ms
4,652 KB
testcase_19 AC 49 ms
4,540 KB
testcase_20 AC 51 ms
4,744 KB
testcase_21 AC 54 ms
4,508 KB
testcase_22 AC 56 ms
4,508 KB
testcase_23 AC 57 ms
4,520 KB
testcase_24 AC 52 ms
4,592 KB
testcase_25 AC 53 ms
4,524 KB
testcase_26 AC 57 ms
4,528 KB
testcase_27 AC 59 ms
4,592 KB
testcase_28 AC 61 ms
4,544 KB
testcase_29 AC 54 ms
4,416 KB
testcase_30 AC 59 ms
4,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define rep(i,n) for(int i = 0;i < n;i++)
#define REP(i,n,k) for(int i = n;i < k;i++)
#define P(p) cout<<(p)<<endl;
#define pi 3.1415926535
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int dx[] = { 0, 1, 0, -1 };
int dy[] = { -1, 0, 1, 0 };

unsigned long long sttoi(std::string str) {
	unsigned long long ret;
	std::stringstream ss; ss << str;
	ss >> ret;
	return ret;
}

ll gcd(ll a, ll b){
	if (b > a)swap(a, b);
	if (b == 0) return a;
	return gcd(b, a%b);
}
int T[100000], D[100000],N[100000];
int srt(int x, int y){
	return (D[y] * T[x] > D[x] * T[y]);
}
void solve() {
	int n;
	cin >> n;
	rep(i, n)cin >> T[i];
	rep(i, n)cin >> D[i];
	rep(i, n)N[i] = i;
	sort(N, N + n, srt);
	for (int i = 0; i < n; i++){
		cout << N[i]+1;
		if (i != n - 1)cout << " ";
	}
	cout << endl;
}

int main() {
	solve();
	return 0;
}
0