結果

問題 No.232 めぐるはめぐる (2)
ユーザー しらゆきしらゆき
提出日時 2015-11-23 12:10:43
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,172 bytes
コンパイル時間 2,060 ms
コンパイル使用メモリ 102,696 KB
実行使用メモリ 24,964 KB
最終ジャッジ日時 2023-10-11 18:18:23
合計ジャッジ時間 7,818 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 267 ms
24,964 KB
testcase_01 AC 271 ms
23,000 KB
testcase_02 WA -
testcase_03 AC 255 ms
20,812 KB
testcase_04 AC 57 ms
20,856 KB
testcase_05 WA -
testcase_06 AC 56 ms
20,588 KB
testcase_07 AC 56 ms
20,580 KB
testcase_08 AC 204 ms
22,560 KB
testcase_09 AC 56 ms
20,660 KB
testcase_10 WA -
testcase_11 AC 56 ms
18,600 KB
testcase_12 WA -
testcase_13 AC 56 ms
20,596 KB
testcase_14 AC 56 ms
22,620 KB
testcase_15 AC 57 ms
18,688 KB
testcase_16 AC 56 ms
20,680 KB
testcase_17 AC 56 ms
20,568 KB
testcase_18 WA -
testcase_19 AC 56 ms
20,708 KB
testcase_20 WA -
testcase_21 AC 56 ms
20,680 KB
testcase_22 AC 56 ms
18,612 KB
testcase_23 AC 56 ms
22,740 KB
testcase_24 AC 56 ms
20,692 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        var tmp = Console.ReadLine().Split();
        int t = int.Parse(tmp[0]);
        int a = int.Parse(tmp[1]);
        int b = int.Parse(tmp[2]);

        var key = new string[t];

        if (a > t || b > t)
        {
            Console.WriteLine("NO");
            return;
        }
        else
        {
            Console.WriteLine("YES");

            for(int i=0;i< a; i++)
            {
                key[i] += "^";
            }
            for (int i = 0; i < b; i++)
            {
                key[t - i - 1] += ">";
            }

            if (a < t / 2)
            {
                for (int i = a; i < t - 1; i += 2)
                {
                    key[i] += "^";
                    key[i + 1] += "v";
                }
            }
            if (b < t / 2)
            {
                for (int i = a; i < t - 1; i += 2)
                {
                    key[t - i - 1] += ">";
                    key[t - i - 2] += "<";
                }
            }
        }

        for (int i = 0; i < t; i++)
        {
            Console.WriteLine(key[i]);
        }
    }
}
0