結果

問題 No.870 無敵囲い
ユーザー Kaz_nlKaz_nl
提出日時 2019-11-07 21:12:05
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 300 ms
コード長 983 bytes
コンパイル時間 4,048 ms
コンパイル使用メモリ 104,552 KB
実行使用メモリ 25,756 KB
最終ジャッジ日時 2023-09-11 16:27:46
合計ジャッジ時間 6,315 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
21,532 KB
testcase_01 AC 60 ms
25,756 KB
testcase_02 AC 60 ms
21,680 KB
testcase_03 AC 59 ms
21,656 KB
testcase_04 AC 59 ms
23,632 KB
testcase_05 AC 59 ms
21,620 KB
testcase_06 AC 60 ms
21,648 KB
testcase_07 AC 58 ms
19,680 KB
testcase_08 AC 60 ms
21,516 KB
testcase_09 AC 60 ms
19,604 KB
testcase_10 AC 59 ms
23,688 KB
testcase_11 AC 60 ms
19,616 KB
testcase_12 AC 59 ms
23,824 KB
testcase_13 AC 60 ms
21,700 KB
testcase_14 AC 61 ms
21,752 KB
testcase_15 AC 60 ms
21,716 KB
testcase_16 AC 59 ms
21,680 KB
testcase_17 AC 61 ms
21,696 KB
testcase_18 AC 60 ms
21,648 KB
testcase_19 AC 60 ms
21,648 KB
testcase_20 AC 61 ms
21,648 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.Linq;

class Program
{
    static void Main()
    {
        var a = new[] { 2, 8 };
        var b = new[] { 3, 9 };
        var c = new[] { 7, 9 };
        var n = int.Parse(Console.ReadLine());
        for (int i = 0; i < n; i++)
        {
            var d = Console.ReadLine().Split().Select(int.Parse).ToArray();
            if (a[0] == d[0] && a[1] == d[1])
            {
                a[0] = d[2];
                a[1] = d[3];
            }
            else if (b[0] == d[0] && b[1] == d[1])
            {
                b[0] = d[2];
                b[1] = d[3];
            }
            else if (c[0] == d[0] && c[1] == d[1])
            {
                c[0] = d[2];
                c[1] = d[3];
            }
        }
        if (a[0] == 5 && a[1] == 8 && b[0] == 4 && b[1] == 8 && c[0] == 6 && c[1] == 8)
        {
            Console.WriteLine("YES");
        }
        else
        {
            Console.WriteLine("NO");
        }
    }
}
0