結果

問題 No.467 隠されていたゲーム
ユーザー mbanmban
提出日時 2016-12-22 10:18:58
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 946 bytes
コンパイル時間 1,045 ms
コンパイル使用メモリ 110,252 KB
実行使用メモリ 27,552 KB
最終ジャッジ日時 2024-04-15 04:44:45
合計ジャッジ時間 2,497 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
23,472 KB
testcase_01 AC 31 ms
25,268 KB
testcase_02 AC 31 ms
23,096 KB
testcase_03 AC 30 ms
25,244 KB
testcase_04 AC 31 ms
27,552 KB
testcase_05 AC 30 ms
25,388 KB
testcase_06 AC 31 ms
27,280 KB
testcase_07 AC 31 ms
25,392 KB
testcase_08 AC 30 ms
25,500 KB
testcase_09 AC 31 ms
25,012 KB
testcase_10 AC 31 ms
25,132 KB
testcase_11 AC 31 ms
25,624 KB
testcase_12 AC 30 ms
25,520 KB
testcase_13 AC 32 ms
25,136 KB
testcase_14 AC 30 ms
25,624 KB
testcase_15 AC 31 ms
27,408 KB
testcase_16 AC 30 ms
25,380 KB
testcase_17 AC 30 ms
25,376 KB
testcase_18 AC 30 ms
25,260 KB
testcase_19 AC 31 ms
25,368 KB
testcase_20 AC 31 ms
25,240 KB
testcase_21 AC 29 ms
25,140 KB
testcase_22 AC 31 ms
27,400 KB
testcase_23 AC 29 ms
25,372 KB
testcase_24 AC 30 ms
27,292 KB
testcase_25 AC 30 ms
25,240 KB
testcase_26 AC 32 ms
25,492 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;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

class Magatro
{

    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        int[] d = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        int x, y;
        string[] s = Console.ReadLine().Split(' ');
        x = Math.Abs(int.Parse(s[0]));
        y = Math.Abs(int.Parse(s[1]));
        int max = Math.Max(x, y);
        int dmax = d.Max();
        if (max == 0)
        {
            Console.WriteLine(0);
            return;
        }
        if (d.Contains(max))
        {
            Console.WriteLine(1);
            return;
        }
        if (dmax > max)
        {
            Console.WriteLine(2);
        }
        else
        {
            Console.WriteLine((max + dmax - 1) / dmax);
        }


    }


}
0