結果

問題 No.322 Geometry Dash
ユーザー NekosyndromeNekosyndrome
提出日時 2015-12-15 10:28:48
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 795 bytes
コンパイル時間 1,313 ms
コンパイル使用メモリ 160,484 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-26 04:22:51
合計ジャッジ時間 5,720 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,816 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 29 ms
6,940 KB
testcase_05 AC 31 ms
6,944 KB
testcase_06 AC 33 ms
6,940 KB
testcase_07 AC 36 ms
6,940 KB
testcase_08 AC 38 ms
6,940 KB
testcase_09 AC 32 ms
6,944 KB
testcase_10 AC 33 ms
6,944 KB
testcase_11 AC 36 ms
6,944 KB
testcase_12 AC 37 ms
6,944 KB
testcase_13 AC 39 ms
6,940 KB
testcase_14 AC 34 ms
6,944 KB
testcase_15 AC 35 ms
6,940 KB
testcase_16 AC 37 ms
6,940 KB
testcase_17 AC 40 ms
6,948 KB
testcase_18 AC 40 ms
6,940 KB
testcase_19 AC 36 ms
6,944 KB
testcase_20 AC 36 ms
6,940 KB
testcase_21 AC 40 ms
6,944 KB
testcase_22 AC 40 ms
6,944 KB
testcase_23 AC 41 ms
6,944 KB
testcase_24 AC 37 ms
6,940 KB
testcase_25 AC 38 ms
6,940 KB
testcase_26 AC 41 ms
6,940 KB
testcase_27 AC 42 ms
6,940 KB
testcase_28 AC 42 ms
6,940 KB
testcase_29 AC 34 ms
6,940 KB
testcase_30 AC 37 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘void RI(int&, T& ...) [with T = {}]’:
main.cpp:15:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |     scanf("%d",&head);
      |     ~~~~~^~~~~~~~~~~~

ソースコード

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