結果

問題 No.231 めぐるはめぐる (1)
ユーザー NoNo
提出日時 2015-06-26 23:23:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 1,000 ms
コード長 1,868 bytes
コンパイル時間 2,343 ms
コンパイル使用メモリ 107,932 KB
実行使用メモリ 22,784 KB
最終ジャッジ日時 2023-08-07 18:37:13
合計ジャッジ時間 4,058 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
20,648 KB
testcase_01 AC 56 ms
20,800 KB
testcase_02 AC 55 ms
20,716 KB
testcase_03 AC 58 ms
20,764 KB
testcase_04 AC 58 ms
20,856 KB
testcase_05 AC 56 ms
22,688 KB
testcase_06 AC 58 ms
20,596 KB
testcase_07 AC 58 ms
20,620 KB
testcase_08 AC 58 ms
20,592 KB
testcase_09 AC 57 ms
20,720 KB
testcase_10 AC 57 ms
20,696 KB
testcase_11 AC 55 ms
22,784 KB
testcase_12 AC 57 ms
20,688 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.Text;
using System.Threading.Tasks;

namespace foryuki
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] g = new int[n];
            int[] d = new int[n];

            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                g[i] = int.Parse(s[0]);
                d[i] = int.Parse(s[1]);
            }

            int ex = 0;
            int max = 0;
            int idx = 0;
            //経験値の大きいダンジョンを探す
            for (int i = 0; i < n; i++)
            {
                ex = g[i] - d[i] * 30000;
                if (ex > max)
                {
                    max = ex;
                    idx = i;
                }
            }

            //レベルダウン
            if (true)
            {
                //97以前の経験値?
            }

            //レベルアップ?

            if ((g[idx] - d[idx] * 30000) * 6 >= 3000000)
            {
                Console.WriteLine("YES");
                for (int i = 0; i < 6; i++)
                {
                    Console.WriteLine(idx + 1);
                }
            }
            else
            {
                Console.WriteLine("NO");
            }
        }

        //-------------------------------------------------------------

        static int[] ConvertStringArrayToIntArray(string[] array)
        {
            return Array.ConvertAll(array, str => int.Parse(str));
        }

        static List<int> ConvertStringArrayToIntList(string[] str)
        {
            var list = new List<int>();
            foreach (var c in str) list.Add(int.Parse(c));
            return list;
        }
    }
}
0