結果

問題 No.870 無敵囲い
ユーザー keymoonkeymoon
提出日時 2020-02-05 14:07:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 300 ms
コード長 1,040 bytes
コンパイル時間 3,910 ms
コンパイル使用メモリ 101,824 KB
実行使用メモリ 22,772 KB
最終ジャッジ日時 2023-09-11 16:29:53
合計ジャッジ時間 4,231 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
22,684 KB
testcase_01 AC 54 ms
20,540 KB
testcase_02 AC 53 ms
20,652 KB
testcase_03 AC 53 ms
22,772 KB
testcase_04 AC 53 ms
20,668 KB
testcase_05 AC 53 ms
20,788 KB
testcase_06 AC 54 ms
20,644 KB
testcase_07 AC 53 ms
20,660 KB
testcase_08 AC 54 ms
20,636 KB
testcase_09 AC 56 ms
20,664 KB
testcase_10 AC 54 ms
20,604 KB
testcase_11 AC 53 ms
20,572 KB
testcase_12 AC 55 ms
20,668 KB
testcase_13 AC 55 ms
20,676 KB
testcase_14 AC 54 ms
20,736 KB
testcase_15 AC 53 ms
20,684 KB
testcase_16 AC 54 ms
20,752 KB
testcase_17 AC 54 ms
20,812 KB
testcase_18 AC 54 ms
20,640 KB
testcase_19 AC 55 ms
22,616 KB
testcase_20 AC 53 ms
20,700 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.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using static System.Math;
using System.Threading.Tasks;
using MethodImplAttribute = System.Runtime.CompilerServices.MethodImplAttribute;
using MethodImplOptions = System.Runtime.CompilerServices.MethodImplOptions;

public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        var a = "2 8";
        var b = "3 9";
        var c = "7 9";
        for (int i = 0; i < n; i++)
        {
            var q = Console.ReadLine().Split();
            var before = $"{q[0]} {q[1]}";
            var after = $"{q[2]} {q[3]}";
            if (a == before) a = after;
            if (b == before) b = after;
            if (c == before) c = after;
        }
        if (a == "5 8" && b == "4 8" && c == "6 8") Console.WriteLine("YES");
        else Console.WriteLine("NO");
    }
}
0