結果
| 問題 | No.322 Geometry Dash |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-15 00:55:36 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 2,000 ms |
| コード長 | 642 bytes |
| 記録 | |
| コンパイル時間 | 1,882 ms |
| コンパイル使用メモリ | 107,392 KB |
| 実行使用メモリ | 41,408 KB |
| 最終ジャッジ日時 | 2026-05-08 19:19:29 |
| 合計ジャッジ時間 | 6,477 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)));
}
}
}