結果

問題 No.2535 多重同値
ユーザー volhalinkvolhalink
提出日時 2023-11-10 22:45:11
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 9,050 ms
コンパイル使用メモリ 158,852 KB
実行使用メモリ 182,476 KB
最終ジャッジ日時 2023-11-10 22:45:23
合計ジャッジ時間 11,282 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
31,012 KB
testcase_01 AC 53 ms
31,012 KB
testcase_02 AC 53 ms
31,012 KB
testcase_03 AC 54 ms
31,012 KB
testcase_04 WA -
testcase_05 AC 53 ms
31,012 KB
testcase_06 AC 53 ms
31,012 KB
testcase_07 AC 54 ms
31,012 KB
testcase_08 AC 54 ms
31,012 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (94 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;

class Program
{
    static void Main(string[] args)
    {
        var n = int.Parse(Console.ReadLine());
        var p = new bool[n];
        var input = Console.ReadLine();
        if (input == "Yes") p[0] = true;
        for (int i = 1; i < n; i++)
        {
            input = Console.ReadLine();
            if (input == "Yes") p[i] = p[i-1];
            else p[i] = false;
        }

        for (int i = 0; i < n; i++)
        {
            Console.WriteLine(p[i] ? "Yes" : "No");
        }
    }
}
0