結果

問題 No.2270 T0空間
ユーザー 👑 kakel-sankakel-san
提出日時 2023-07-05 18:18:09
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 935 bytes
コンパイル時間 1,788 ms
コンパイル使用メモリ 67,712 KB
実行使用メモリ 27,584 KB
最終ジャッジ日時 2023-09-26 18:38:11
合計ジャッジ時間 14,165 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
23,572 KB
testcase_01 AC 54 ms
21,432 KB
testcase_02 AC 54 ms
21,472 KB
testcase_03 AC 54 ms
21,512 KB
testcase_04 AC 55 ms
23,448 KB
testcase_05 AC 54 ms
21,612 KB
testcase_06 AC 55 ms
21,456 KB
testcase_07 AC 57 ms
21,544 KB
testcase_08 AC 55 ms
21,576 KB
testcase_09 AC 55 ms
21,396 KB
testcase_10 AC 55 ms
23,328 KB
testcase_11 AC 237 ms
25,472 KB
testcase_12 AC 197 ms
25,620 KB
testcase_13 AC 785 ms
27,584 KB
testcase_14 AC 783 ms
27,432 KB
testcase_15 AC 782 ms
25,492 KB
testcase_16 TLE -
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;
class Program
{
    static int NN => int.Parse(ReadLine());
    static string[] SList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => ReadLine()).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var n = NN;
        var m = NN;
        var list = new bool[n * n];
        for (var i = 0; i < n; ++i) list[n * i + i] = true;
        for (var i = 0; i < m; ++i)
        {
            var s = ReadLine();
            for (var j = 0; j < s.Length; ++j) for (var k = j + 1; k < s.Length; ++k)
            {
                if (s[j] != s[k])
                {
                    list[j * n + k] = true;
                    list[k * n + j] = true;
                }
            }
        }
        WriteLine(list.All(f => f) ? "Yes" : "No");
    }
}
0