結果

問題 No.231 めぐるはめぐる (1)
ユーザー huffman56huffman56
提出日時 2022-10-30 16:09:40
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 1,000 ms
コード長 1,050 bytes
コンパイル時間 4,849 ms
コンパイル使用メモリ 104,484 KB
実行使用メモリ 23,828 KB
最終ジャッジ日時 2023-09-21 13:37:02
合計ジャッジ時間 4,782 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
21,660 KB
testcase_01 AC 58 ms
21,700 KB
testcase_02 AC 57 ms
23,828 KB
testcase_03 AC 60 ms
21,756 KB
testcase_04 AC 60 ms
19,592 KB
testcase_05 AC 58 ms
21,740 KB
testcase_06 AC 61 ms
19,752 KB
testcase_07 AC 60 ms
19,676 KB
testcase_08 AC 61 ms
21,800 KB
testcase_09 AC 58 ms
19,716 KB
testcase_10 AC 58 ms
19,664 KB
testcase_11 AC 58 ms
21,616 KB
testcase_12 AC 61 ms
23,708 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.Generic;
using System.Linq;
using System.Numerics;
using static System.Math;

namespace SortItems
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var chk = new List<int>();

            for (var i = 0; i < n; i++)
            {
                var x = Console.ReadLine().Split().Select(int.Parse).ToArray();
                chk.Add(x[0] - x[1] * 30000);
            }

            // 最大経験値
            var keikentiMax = chk.Max();
            // レベルアップに必要な経験値
            var levelMax = 30000 * 100;

            if (levelMax <= keikentiMax * 6)
            {
                Console.WriteLine("YES");
                for (var i = 1; i <= 6; i++)
                {
                    Console.WriteLine(chk.IndexOf(keikentiMax) + 1);
                }
            }
            else
            {
                Console.WriteLine("NO");
            }
            

        }
    }
}
0