結果

問題 No.244 ★1のグラフの問題
ユーザー nokonokonokonoko
提出日時 2015-07-18 06:44:55
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 2,271 bytes
コンパイル時間 950 ms
コンパイル使用メモリ 114,648 KB
実行使用メモリ 26,816 KB
最終ジャッジ日時 2024-04-15 02:54:44
合計ジャッジ時間 1,488 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
24,804 KB
testcase_01 AC 23 ms
24,804 KB
testcase_02 AC 24 ms
24,804 KB
testcase_03 AC 23 ms
24,752 KB
testcase_04 AC 22 ms
24,672 KB
testcase_05 AC 23 ms
24,804 KB
testcase_06 AC 23 ms
24,880 KB
testcase_07 AC 23 ms
24,884 KB
testcase_08 AC 22 ms
26,816 KB
testcase_09 AC 22 ms
24,552 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;

class Program
{
    static void Main()
    {
        LIB.IO.W(LIB.IO.R<int>() - 1);
        LIB.IO.WFLUSH();
    }
}

namespace LIB
{
    public class IO
    {
        private const int WMAX = 1000;
        private static string WSTRING = "";
        public static T R<T>()
        {
            return (T)(Convert.ChangeType(R(), typeof(T)));
        }
        public static T[] R<T>(char splitter = ' ')
        {
            return R().Split(splitter).Select(v => UTILITY.PARSE<T>(v)).ToArray();
        }
        public static T[] R<T>(int length)
        {

            T[] ret = new T[length];
            for (int i = 0; i < length; i++)
            {
                ret[i] = R<T>();
            }
            return ret;
        }
        public static T[][] R<T>(int length, char splitter = ' ')
        {
            T[][] ret = new T[length][];
            for (int i = 0; i < length; i++)
            {
                ret[i] = R<T>(splitter);
            }
            return ret;
        }
        private static string R()
        {
            return Console.ReadLine();
        }
        public static void W(object value, bool addLineFeed = true)
        {
            WSTRING += UTILITY.PARSE<string>(value);
            if (addLineFeed == true) { WSTRING += "\n"; }
            if (WSTRING.Count() >= WMAX) { WFLUSH(); }
        }
        public static void WFLUSH()
        {
            Console.Write(WSTRING);
            WSTRING = "";
        }
    }
    public class UTILITY
    {
        public static T PARSE<T>(object value)
        {
            return (T)(Convert.ChangeType(value, typeof(T)));
        }
    }
    public class MEMO<Key, Result>
    {
        private Dictionary<Key, Result> results;
        public MEMO()
        {
            results = new Dictionary<Key, Result>();
        }
        public Result EXEC(Key key, Func<Key, Result> func)
        {
            Result ret = default(Result);
            if (results.ContainsKey(key))
            {
                ret = results[key];
            }
            else
            {
                ret = func(key);
                results.Add(key, ret);
            }
            return ret;
        }
    }
}
0