結果
問題 |
No.322 Geometry Dash
|
ユーザー |
|
提出日時 | 2015-12-15 00:55:36 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 141 ms / 2,000 ms |
コード長 | 642 bytes |
コンパイル時間 | 2,627 ms |
コンパイル使用メモリ | 106,240 KB |
実行使用メモリ | 37,888 KB |
最終ジャッジ日時 | 2024-11-08 16:48:15 |
合計ジャッジ時間 | 9,478 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.
ソースコード
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(x => int.Parse(x)).ToArray(); int[] D = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).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))); } } }