結果
| 問題 |
No.549 素材合成システム
|
| コンテスト | |
| ユーザー |
Risen
|
| 提出日時 | 2017-07-28 22:47:51 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 542 ms / 2,000 ms |
| コード長 | 413 bytes |
| コンパイル時間 | 2,629 ms |
| コンパイル使用メモリ | 114,360 KB |
| 実行使用メモリ | 34,284 KB |
| 最終ジャッジ日時 | 2024-10-10 03:55:56 |
| 合計ジャッジ時間 | 19,334 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 44 |
コンパイルメッセージ
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;
class Solution
{
static void Main()
{
var n = int.Parse(Console.ReadLine());
var x = Console.ReadLine().Split(' ').Select(int.Parse).OrderBy(i => i).ToList();
while (x.Count > 1)
{
x[x.Count - 1] += x[0] / 2;
x.RemoveAt(0);
}
Console.WriteLine(x.First());
}
}
Risen