結果
問題 | No.870 無敵囲い |
ユーザー |
![]() |
提出日時 | 2020-02-05 14:07:36 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 300 ms |
コード長 | 1,040 bytes |
コンパイル時間 | 1,046 ms |
コンパイル使用メモリ | 109,060 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-06-29 06:37:29 |
合計ジャッジ時間 | 2,113 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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");}}