結果

問題 No.322 Geometry Dash
ユーザー Yang33Yang33
提出日時 2018-10-02 22:12:57
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 1,644 bytes
コンパイル時間 1,767 ms
コンパイル使用メモリ 173,376 KB
実行使用メモリ 8,344 KB
最終ジャッジ日時 2023-08-02 14:27:55
合計ジャッジ時間 7,909 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 26 ms
8,344 KB
testcase_05 AC 27 ms
7,876 KB
testcase_06 AC 30 ms
7,080 KB
testcase_07 AC 30 ms
7,068 KB
testcase_08 AC 32 ms
7,076 KB
testcase_09 AC 26 ms
6,868 KB
testcase_10 AC 28 ms
8,272 KB
testcase_11 AC 30 ms
8,188 KB
testcase_12 AC 32 ms
7,012 KB
testcase_13 AC 33 ms
8,044 KB
testcase_14 AC 29 ms
7,152 KB
testcase_15 AC 30 ms
7,044 KB
testcase_16 AC 31 ms
7,052 KB
testcase_17 AC 33 ms
7,696 KB
testcase_18 AC 34 ms
7,180 KB
testcase_19 AC 31 ms
6,960 KB
testcase_20 AC 33 ms
7,008 KB
testcase_21 AC 33 ms
7,660 KB
testcase_22 AC 35 ms
7,012 KB
testcase_23 AC 36 ms
6,940 KB
testcase_24 AC 32 ms
7,740 KB
testcase_25 AC 32 ms
7,228 KB
testcase_26 AC 34 ms
6,964 KB
testcase_27 AC 35 ms
7,736 KB
testcase_28 AC 36 ms
6,932 KB
testcase_29 AC 30 ms
6,976 KB
testcase_30 AC 33 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using VS = vector<string>;    using LL = long long;
using VI = vector<int>;       using VVI = vector<VI>;
using PII = pair<int, int>;   using PLL = pair<LL, LL>;
using VL = vector<LL>;        using VVL = vector<VL>;

#define ALL(a)  begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define SZ(a) int((a).size())
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))
#define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++)
#define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)--)
#define debug(x) cerr << #x << ": " << x << endl
const int INF = 1e9;                          const LL LINF = 1e16;
const LL MOD = 1000000007;                    const double PI = acos(-1.0);
int DX[8] = { 0, 0, 1, -1, 1, 1, -1, -1 };    int DY[8] = { 1, -1, 0, 0, 1, -1, 1, -1 };

/* -----  2018/10/02  Problem: yukicoder 322  / Link: http://yukicoder.me/problems/no/322  ----- */
/* ------問題------



-----問題ここまで----- */
/* -----解説等-----

サンプルが親切すぎるだろ

----解説ここまで---- */

LL ans = 0LL;

int main() {
	cin.tie(0);
	ios_base::sync_with_stdio(false);

	LL N; cin >> N;
	struct box {
		LL a, b;
		int id;
		box(LL a,LL b, int id):a(a),b(b),id(id){}
		bool operator < (const box& r)const {
			return r.a*b < r.b*a;
		}
	};
	VI t(N), d(N);
	FOR(i, 0, N) {
		cin >> t[i];
	}
	FOR(i, 0, N) {
		cin >> d[i];
	}
	vector<box> boxes;
	FOR(i, 0, N) {
		boxes.push_back(box(t[i], d[i], i + 1));
	}
	SORT(boxes);
	for (auto it : boxes) {
		cout << it.id << " ";
	}cout << endl;

	return 0;
}
0