結果

問題 No.322 Geometry Dash
ユーザー pekempeypekempey
提出日時 2015-12-15 01:10:07
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 2,437 ms
コンパイル使用メモリ 105,856 KB
実行使用メモリ 38,016 KB
最終ジャッジ日時 2024-11-08 16:50:34
合計ジャッジ時間 8,247 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
	class Program
	{
		static void Main(string[] args)
		{
			new Program().Solve();
		}

		void Solve()
		{
			int n = int.Parse(Console.ReadLine());
			int[] T = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
			int[] D = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
			int[] index = Enumerable.Range(0, n).ToArray();
			Array.Sort(index, (i, j) => T[j] * D[i] - T[i] * D[j]);
			Console.WriteLine(string.Join(" ", index.Select(x => x + 1)));
		}
	}
}
0