Submission #670728


Source Code Expand

using System;
using System.Linq;
using System.Collections;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace NotFounds
{
    public class Program
    {
        public static void Main(string[] args)
        {
            new Program().Solve();
        }

        public void Solve()
        {
            MyInputStream  cin  = new MyInputStream();
            Console.WriteLine(cin.ReadInt() - cin.ReadInt());
        }
    }

    public class MyInputStream
    {
        private char separator = ' ';
        private Queue<string> inputStream;
        public MyInputStream(char separator = ' ')
        {
            this.separator = separator;
            inputStream = new Queue<string>();
        }

        public string Read()
        {
            if (inputStream.Count != 0) return inputStream.Dequeue();
            string[] tmp = Console.ReadLine().Split(separator);
            for (int i = 0; i < tmp.Length; i++)
            {
                inputStream.Enqueue(tmp[i]);
            }
            return inputStream.Dequeue();
        }
        public string ReadLine()   { return Console.ReadLine(); }
        public int    ReadInt()    { return int.Parse(Read()); }
        public long   ReadLong()   { return long.Parse(Read()); }
        public double ReadDouble() { return double.Parse(Read()); }
    }

    public class MyUtility
    {
        /// <summary>2値を入れ替える</summary>
        public static void Swap<T>(ref T m, ref T n)
        {
            T tmp = m;
            m = n;
            n = tmp;
        }

        /// <summary>値を出力する</summary>
        public static void Dump(params object[] data)
        {
            data.Dump();
        }
    }

    public static class MyEnumerableExtentions
    {
        public static string ConcatWith<T>(this IEnumerable<T> source, string separator,
                string format, IFormatProvider provider = null) where T : IFormattable
        {
            return source.Select(x => x.ToString(format, provider)).Aggregate((a, b) => a + separator + b);
        }

        public static string ConcatWith<T>(this IEnumerable<T> source, string separator)
        {
            return string.Join(separator, source);
        }

        public static void ForEach<T>(this IEnumerable<T> source, Action<T, int> func)
        {
            foreach (var item in source.Select((x, i) => new { val = x, idx = i }))
                func(item.val, item.idx);
        }

        public static void ForEach<T>(this IEnumerable<T> source, Action<T> func)
        {
            foreach (var item in source)
                func(item);
        }

        public static void Dump<T>(this IEnumerable<T> source)
        {
            Console.WriteLine("{ " + source.ConcatWith(", ") + " }");
        }

        public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> source)
        {
            return source.OrderBy(x => Guid.NewGuid());
        }

        public static bool IsEmpty<T>(this IEnumerable<T> source)
        {
            return !source.Any();
        }
    }
}

Submission Info

Submission Time
Task A - 積雪深差
User donguri411
Language C# (Mono 2.10.8.1)
Score 100
Code Size 3233 Byte
Status AC
Exec Time 157 ms
Memory 9924 KB

Judge Result

Set Name all
Score / Max Score 100 / 100
Status
AC × 20
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 157 ms 9864 KB
00_sample_02.txt AC 123 ms 9912 KB
00_sample_03.txt AC 122 ms 9920 KB
test_01.txt AC 125 ms 9916 KB
test_02.txt AC 127 ms 9924 KB
test_03.txt AC 129 ms 9848 KB
test_04.txt AC 124 ms 9896 KB
test_05.txt AC 123 ms 9908 KB
test_06.txt AC 127 ms 9884 KB
test_07.txt AC 127 ms 9892 KB
test_08.txt AC 126 ms 9900 KB
test_09.txt AC 127 ms 9916 KB
test_10.txt AC 123 ms 9916 KB
test_11.txt AC 124 ms 9896 KB
test_12.txt AC 129 ms 9860 KB
test_13.txt AC 129 ms 9884 KB
test_14.txt AC 125 ms 9916 KB
test_15.txt AC 124 ms 9904 KB
test_16.txt AC 126 ms 9904 KB
test_17.txt AC 125 ms 9876 KB