結果

問題 No.1133 キムワイプイーター
ユーザー keymoonkeymoon
提出日時 2021-01-15 00:26:34
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 940 bytes
コンパイル時間 974 ms
コンパイル使用メモリ 114,700 KB
実行使用メモリ 32,208 KB
最終ジャッジ日時 2024-05-03 17:07:12
合計ジャッジ時間 3,613 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
19,328 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 46 ms
21,248 KB
testcase_10 AC 55 ms
22,400 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 51 ms
22,400 KB
testcase_14 AC 41 ms
20,992 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 29 ms
19,456 KB
testcase_24 AC 29 ms
19,072 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 30 ms
19,200 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 29 ms
19,200 KB
testcase_32 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 System.Threading.Tasks;
using static System.Math;

public static class P
{
    public static void Main()
    {
        var nm = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var n = nm[0];
        var m = nm[1];
        var map = Enumerable.Repeat(0, n + 1).Select(_ => Enumerable.Repeat(1, n + 1).ToArray()).ToArray();
        var (y, x) = (0, 0);
        map[y][x] = 0;
        foreach (var c in Console.ReadLine())
        {
            if (c == 'R') x++;
            if (c == 'L') x--;
            if (c == 'U') y++;
            if (c == 'D') y--;
            try { map[y][x] = 0; } catch { }
        }

        Console.WriteLine(string.Join("\n", map.Select(x => string.Join(" ", x))));
    }
}
0