東大卒のお金やりくり奮闘記~株、家計、趣味、経済~

東大卒でメーカー勤務の私がセミリタイアするために投資などを頑張っていこうという趣旨で始めたブログです。既婚男性です。株、家計、趣味、経済の話をメインにゆるゆる話します。

ABC191で書いたコード

using System;
using System.Numerics;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace debug
{
    class main
    {
        static void Main(string args)
        {
            //問題クラスを展開
            ProgramD a = new ProgramD();
            a.main();//実行する

        }

    }
    //ABC190
    class ProgramA
    {
        public void main()
        {
            //入力
            string s = Console.ReadLine().Split();

            //T*V以上、S*V以下なら打てない。それ以外は打てる
            if (int.Parse(s[0])* int.Parse(s[1]) <= int.Parse(s[3]) && int.Parse(s[3]) <= int.Parse(s[0]) * int.Parse(s[2]))
                    Console.WriteLine("No");
            else
                    Console.WriteLine("Yes");
        }
    }

    class ProgramB
    {
        public void main()
        {
            //入
            string s = Console.ReadLine().Split();
            long n = long.Parse(s[0]);
            long x = long.Parse(s[1]);

            string a = Console.ReadLine().Split();

            //もしxでないなら追加する。
            for (int i = 0i < ni++)
            {
                if (long.Parse(a[i]) != x)
                {
                    Console.Write(long.Parse(a[i]));
                    Console.Write(" ");
                }

            }
        }
    }

    class ProgramC
    {
        public void main()
        {

            //入力
            string s = Console.ReadLine().Split();
            long h = long.Parse(s[0]);
            long w = long.Parse(s[1]);
            long[,] maze = new long[hw];
            long start = new long[h];
            long[] endnew long[h];

            //迷路を記録する
            for (int i = 0i < hi++)
            {
                string s1 = Console.ReadLine();
                for (int j = 0j < wj++)
                {
                    if (s1[j] == '#')
                    {
                        maze[ij] = 1;
                    }
                }
                   
            }

            int count = 0;
            //おけるケースも記録しておく
            for (int i = 1i < hi++)
                for (int j = 1j < wj++)
                {
                    int flag = 0;
                    //候補になる点の白を数える
                    if (maze[ij] == 1
                        flag++;

                    if(maze[ij1] == 1)
                        flag++;

                    if (maze[i - 1j] == 1)
                        flag++;

                    if (maze[i - 1j - 1] == 1)
                        flag++;

                    //もし1か3個なら足す
                    if (flag == 1 | flag == 3)
                        count++;
                }
            //答え出力
            Console.WriteLine(count);
        }
    }
}