結果

問題 No.322 Geometry Dash
ユーザー kuuso1kuuso1
提出日時 2015-12-15 23:12:08
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 1,196 bytes
コンパイル時間 928 ms
コンパイル使用メモリ 113,556 KB
実行使用メモリ 48,392 KB
最終ジャッジ日時 2024-04-26 05:07:20
合計ジャッジ時間 8,284 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
25,424 KB
testcase_01 AC 31 ms
25,196 KB
testcase_02 AC 31 ms
23,344 KB
testcase_03 AC 32 ms
27,600 KB
testcase_04 AC 133 ms
45,896 KB
testcase_05 AC 137 ms
45,876 KB
testcase_06 AC 138 ms
46,200 KB
testcase_07 AC 144 ms
45,616 KB
testcase_08 AC 146 ms
47,500 KB
testcase_09 AC 139 ms
45,744 KB
testcase_10 AC 138 ms
47,820 KB
testcase_11 AC 143 ms
46,600 KB
testcase_12 AC 146 ms
43,480 KB
testcase_13 AC 152 ms
47,636 KB
testcase_14 AC 142 ms
48,252 KB
testcase_15 AC 142 ms
48,392 KB
testcase_16 AC 148 ms
47,796 KB
testcase_17 AC 150 ms
46,000 KB
testcase_18 AC 154 ms
47,964 KB
testcase_19 AC 145 ms
45,512 KB
testcase_20 AC 146 ms
45,664 KB
testcase_21 AC 150 ms
45,980 KB
testcase_22 AC 155 ms
46,040 KB
testcase_23 AC 157 ms
48,304 KB
testcase_24 AC 147 ms
47,644 KB
testcase_25 AC 145 ms
47,516 KB
testcase_26 AC 155 ms
45,940 KB
testcase_27 AC 156 ms
46,388 KB
testcase_28 AC 158 ms
46,424 KB
testcase_29 AC 133 ms
46,120 KB
testcase_30 AC 138 ms
45,360 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.D*y.T-x.T*y.D);
		Console.WriteLine(String.Join(" ",P.Select(x=>x.Idx).ToArray()));
		
		
	}
	int N;
	int[] T;
	int[] D;
	public Sol(){
		N=ri();
		T=ria();
		D=ria();
	}
	class Pair{
		public int Idx;
		public int T,D;
		public Pair(int idx,int t,int 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