結果

問題 No.322 Geometry Dash
ユーザー NekosyndromeNekosyndrome
提出日時 2015-12-15 10:28:48
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 795 bytes
コンパイル時間 1,623 ms
コンパイル使用メモリ 146,996 KB
実行使用メモリ 4,972 KB
最終ジャッジ日時 2023-08-08 11:21:41
合計ジャッジ時間 6,525 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 28 ms
4,656 KB
testcase_05 AC 30 ms
4,656 KB
testcase_06 AC 32 ms
4,680 KB
testcase_07 AC 34 ms
4,704 KB
testcase_08 AC 36 ms
4,928 KB
testcase_09 AC 29 ms
4,652 KB
testcase_10 AC 30 ms
4,696 KB
testcase_11 AC 33 ms
4,668 KB
testcase_12 AC 35 ms
4,620 KB
testcase_13 AC 37 ms
4,964 KB
testcase_14 AC 32 ms
4,728 KB
testcase_15 AC 33 ms
4,616 KB
testcase_16 AC 36 ms
4,660 KB
testcase_17 AC 38 ms
4,664 KB
testcase_18 AC 39 ms
4,632 KB
testcase_19 AC 34 ms
4,652 KB
testcase_20 AC 36 ms
4,656 KB
testcase_21 AC 37 ms
4,744 KB
testcase_22 AC 39 ms
4,684 KB
testcase_23 AC 40 ms
4,736 KB
testcase_24 AC 36 ms
4,768 KB
testcase_25 AC 37 ms
4,972 KB
testcase_26 AC 39 ms
4,632 KB
testcase_27 AC 40 ms
4,960 KB
testcase_28 AC 41 ms
4,708 KB
testcase_29 AC 34 ms
4,468 KB
testcase_30 AC 36 ms
4,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define REP(x,y,z) for(int x=y;x<=z;x++)
#define FORD(x,y,z) for(int x=y;x>=z;x--)
#define MSET(x,y) memset(x,y,sizeof(x))
#define FOR(x,y) for(__typeof(y.begin()) x=y.begin();x!=y.end();x++)
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define SZ size()
#define M 100005
void RI(){}
template<typename... T>
void RI( int& head, T&... tail ) {
    scanf("%d",&head);
    RI(tail...);
}
using namespace std;
typedef long long LL;
typedef pair<int,int> P;
int n;
int in1[M],in2[M],ord[M];
int main()
{
	while(~scanf("%d",&n))
	{
		REP(i,1,n) RI(in1[i]);
		REP(i,1,n) RI(in2[i]);
		REP(i,1,n) ord[i]=i;

		sort(ord+1,ord+1+n,[](int a,int b){ return in1[a]*in2[b]>in1[b]*in2[a]; }) ;

		REP(i,1,n) printf("%d ",ord[i]); puts("");
	}
	return 0;
}
0