結果

問題 No.322 Geometry Dash
ユーザー kotatsugamekotatsugame
提出日時 2020-03-01 04:29:24
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 541 bytes
コンパイル時間 916 ms
コンパイル使用メモリ 76,820 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-21 22:03:44
合計ジャッジ時間 6,629 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,248 KB
testcase_01 AC 3 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 42 ms
5,376 KB
testcase_05 AC 45 ms
5,376 KB
testcase_06 AC 48 ms
5,376 KB
testcase_07 AC 51 ms
5,376 KB
testcase_08 AC 54 ms
5,376 KB
testcase_09 AC 44 ms
5,376 KB
testcase_10 AC 45 ms
5,376 KB
testcase_11 AC 48 ms
5,376 KB
testcase_12 AC 52 ms
5,376 KB
testcase_13 AC 54 ms
5,376 KB
testcase_14 AC 48 ms
5,376 KB
testcase_15 AC 49 ms
5,376 KB
testcase_16 AC 52 ms
5,376 KB
testcase_17 AC 55 ms
5,376 KB
testcase_18 AC 57 ms
5,376 KB
testcase_19 AC 50 ms
5,376 KB
testcase_20 AC 52 ms
5,376 KB
testcase_21 AC 56 ms
5,376 KB
testcase_22 AC 57 ms
5,376 KB
testcase_23 AC 59 ms
5,376 KB
testcase_24 AC 53 ms
5,376 KB
testcase_25 AC 54 ms
5,376 KB
testcase_26 AC 57 ms
5,376 KB
testcase_27 AC 60 ms
5,376 KB
testcase_28 AC 61 ms
5,376 KB
testcase_29 AC 57 ms
5,376 KB
testcase_30 AC 62 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int N;
int T[1<<17],D[1<<17];
main()
{
	cin>>N;
	for(int i=0;i<N;i++)cin>>T[i];
	for(int i=0;i<N;i++)cin>>D[i];
	vector<pair<pair<int,int>,int> >A(N);
	for(int i=0;i<N;i++)
	{
		A[i].first.first=T[i];
		A[i].first.second=D[i];
		A[i].second=i+1;
	}
	sort(A.begin(),A.end(),[](pair<pair<int,int>,int>a,pair<pair<int,int>,int>b)
	{
		return a.first.first*b.first.second>a.first.second*b.first.first;
	});
	for(int i=0;i<N;i++)cout<<A[i].second<<(i+1==N?'\n':' ');
}
0