結果

問題 No.290 1010
ユーザー mbanmban
提出日時 2016-12-25 10:58:41
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 64 ms / 5,000 ms
コード長 730 bytes
コンパイル時間 3,862 ms
コンパイル使用メモリ 104,172 KB
実行使用メモリ 26,012 KB
最終ジャッジ日時 2023-08-21 08:59:18
合計ジャッジ時間 6,655 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
22,840 KB
testcase_01 AC 53 ms
20,576 KB
testcase_02 AC 54 ms
22,716 KB
testcase_03 AC 54 ms
22,708 KB
testcase_04 AC 53 ms
22,788 KB
testcase_05 AC 54 ms
20,608 KB
testcase_06 AC 54 ms
22,776 KB
testcase_07 AC 54 ms
22,788 KB
testcase_08 AC 54 ms
20,644 KB
testcase_09 AC 55 ms
20,748 KB
testcase_10 AC 53 ms
20,736 KB
testcase_11 AC 53 ms
20,864 KB
testcase_12 AC 53 ms
22,668 KB
testcase_13 AC 54 ms
20,740 KB
testcase_14 AC 53 ms
22,784 KB
testcase_15 AC 53 ms
18,632 KB
testcase_16 AC 53 ms
20,772 KB
testcase_17 AC 53 ms
20,604 KB
testcase_18 AC 54 ms
22,824 KB
testcase_19 AC 53 ms
20,624 KB
testcase_20 AC 64 ms
26,012 KB
testcase_21 AC 63 ms
24,028 KB
testcase_22 AC 63 ms
23,960 KB
testcase_23 AC 64 ms
24,024 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 int N = int.Parse(Console.ReadLine());
    static string S = Console.ReadLine();

    static void Main()
    {
        if (N == 1) Console.WriteLine("NO");
        else if (N == 2)
        {
            if (S == "00" || S == "11") Console.WriteLine("YES");
            else Console.WriteLine("NO");
        }
        else if (N == 3)
        {
            if (S == "101" || S == "010") Console.WriteLine("NO");
            else Console.WriteLine("YES");
        }
        else Console.WriteLine("YES");
    }

}


0