結果

問題 No.384 マス埋めゲーム2
ユーザー mbanmban
提出日時 2017-01-09 23:54:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 1,000 ms
コード長 1,424 bytes
コンパイル時間 2,175 ms
コンパイル使用メモリ 104,384 KB
実行使用メモリ 22,920 KB
最終ジャッジ日時 2023-08-22 21:55:48
合計ジャッジ時間 4,710 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
22,920 KB
testcase_01 AC 56 ms
20,808 KB
testcase_02 AC 57 ms
20,828 KB
testcase_03 AC 57 ms
20,696 KB
testcase_04 AC 57 ms
20,820 KB
testcase_05 AC 57 ms
22,800 KB
testcase_06 AC 56 ms
20,924 KB
testcase_07 AC 55 ms
20,724 KB
testcase_08 AC 56 ms
20,668 KB
testcase_09 AC 57 ms
22,832 KB
testcase_10 AC 57 ms
22,708 KB
testcase_11 AC 56 ms
20,828 KB
testcase_12 AC 56 ms
20,868 KB
testcase_13 AC 57 ms
20,748 KB
testcase_14 AC 57 ms
20,660 KB
testcase_15 AC 56 ms
18,780 KB
testcase_16 AC 58 ms
20,780 KB
testcase_17 AC 57 ms
20,824 KB
testcase_18 AC 58 ms
22,708 KB
testcase_19 AC 56 ms
20,696 KB
testcase_20 AC 56 ms
20,708 KB
testcase_21 AC 56 ms
20,816 KB
testcase_22 AC 58 ms
22,872 KB
testcase_23 AC 57 ms
22,656 KB
testcase_24 AC 57 ms
20,680 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 Scanner sc = new Scanner();
    static long H, W, N, K;
    static void Main()
    {
        H = sc.NextLong();
        W = sc.NextLong();
        N = sc.NextLong();
        K = sc.NextLong();
        if (N == K)
        {
            K = 0;
        }
        long lose = (H + W - 1) % N;
        if (lose == K)
        {
            Console.WriteLine("YES");
        }
        else
        {
            Console.WriteLine("NO");
        }
    }

}

public class Scanner
{
    private string[] S;
    private int Index;
    private char Separator;
    public Scanner(char separator=' ')
    {
        Index = 0;
        Separator = separator;
    }
    public string Next()
    {
        string result;
        if (S == null || Index >= S.Length)
        {
            S = Line();
            Index = 0;
        }
        result = S[Index];
        Index++;
        return result;
    }
    private string[] Line()
    {
        return Console.ReadLine().Split(Separator);
    } 
    public int NextInt()
    {
        return int.Parse(Next());
    }
    public double NextDouble()
    {
        return double.Parse(Next());
    }
    public long NextLong()
    {
        return long.Parse(Next());
    }
}
0