結果

問題 No.322 Geometry Dash
ユーザー kuuso1kuuso1
提出日時 2015-12-15 23:10:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 1,224 bytes
コンパイル時間 4,283 ms
コンパイル使用メモリ 111,116 KB
実行使用メモリ 46,488 KB
最終ジャッジ日時 2023-08-08 12:08:34
合計ジャッジ時間 13,460 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
21,592 KB
testcase_01 AC 65 ms
21,816 KB
testcase_02 AC 65 ms
23,728 KB
testcase_03 AC 64 ms
21,620 KB
testcase_04 AC 175 ms
43,972 KB
testcase_05 AC 179 ms
44,052 KB
testcase_06 AC 185 ms
42,520 KB
testcase_07 AC 186 ms
42,500 KB
testcase_08 AC 190 ms
44,632 KB
testcase_09 AC 179 ms
41,904 KB
testcase_10 AC 184 ms
44,128 KB
testcase_11 AC 187 ms
46,488 KB
testcase_12 AC 187 ms
42,612 KB
testcase_13 AC 190 ms
44,696 KB
testcase_14 AC 183 ms
42,360 KB
testcase_15 AC 187 ms
40,340 KB
testcase_16 AC 192 ms
42,696 KB
testcase_17 AC 190 ms
40,936 KB
testcase_18 AC 191 ms
42,992 KB
testcase_19 AC 185 ms
42,560 KB
testcase_20 AC 187 ms
44,644 KB
testcase_21 AC 191 ms
40,916 KB
testcase_22 AC 193 ms
43,284 KB
testcase_23 AC 194 ms
45,552 KB
testcase_24 AC 188 ms
42,680 KB
testcase_25 AC 186 ms
44,676 KB
testcase_26 AC 194 ms
41,064 KB
testcase_27 AC 199 ms
43,352 KB
testcase_28 AC 199 ms
45,600 KB
testcase_29 AC 175 ms
45,544 KB
testcase_30 AC 184 ms
42,644 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		Pair[] P=new Pair[N];
		for(int i=0;i<N;i++){
			P[i]=new Pair(i+1,T[i],D[i]);
		}
		Array.Sort(P,(x,y)=>x.T*y.D<x.D*y.T?1:x.T*y.D>x.D*y.T?-1:0);
		Console.WriteLine(String.Join(" ",P.Select(x=>x.Idx).ToArray()));
		
		
	}
	int N;
	long[] T;
	long[] D;
	public Sol(){
		N=ri();
		T=rla();
		D=rla();
	}
	class Pair{
		public int Idx;
		public long T,D;
		public Pair(int idx,long t,long d){
			Idx=idx;T=t;D=d;
		}
	}



	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(){return Console.ReadLine().Split(' ');}
	static int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}
	static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}
	static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}
}
0