結果

問題 No.384 マス埋めゲーム2
ユーザー mbanmban
提出日時 2017-01-09 23:53:28
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,418 bytes
コンパイル時間 2,133 ms
コンパイル使用メモリ 106,448 KB
実行使用メモリ 22,884 KB
最終ジャッジ日時 2023-08-22 21:55:38
合計ジャッジ時間 5,154 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
22,884 KB
testcase_01 RE -
testcase_02 AC 57 ms
22,712 KB
testcase_03 AC 57 ms
22,760 KB
testcase_04 AC 56 ms
20,780 KB
testcase_05 AC 57 ms
20,788 KB
testcase_06 AC 58 ms
22,704 KB
testcase_07 AC 56 ms
20,764 KB
testcase_08 AC 58 ms
20,756 KB
testcase_09 AC 57 ms
20,664 KB
testcase_10 AC 57 ms
22,832 KB
testcase_11 AC 56 ms
20,752 KB
testcase_12 AC 56 ms
20,728 KB
testcase_13 AC 56 ms
22,764 KB
testcase_14 AC 56 ms
20,764 KB
testcase_15 AC 56 ms
20,656 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 57 ms
20,776 KB
testcase_19 AC 58 ms
22,764 KB
testcase_20 AC 56 ms
20,588 KB
testcase_21 AC 57 ms
22,828 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 int H, W, N, K;
    static void Main()
    {
        H = sc.NextInt();
        W = sc.NextInt();
        N = sc.NextInt();
        K = sc.NextInt();
        if (N == K)
        {
            K = 0;
        }
        int 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