結果
| 問題 | 
                            No.1133 キムワイプイーター
                             | 
                    
| ユーザー | 
                             keymoon
                         | 
                    
| 提出日時 | 2021-01-15 00:27:45 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 62 ms / 2,000 ms | 
| コード長 | 950 bytes | 
| コンパイル時間 | 2,732 ms | 
| コンパイル使用メモリ | 106,624 KB | 
| 実行使用メモリ | 22,784 KB | 
| 最終ジャッジ日時 | 2024-11-24 20:06:20 | 
| 合計ジャッジ時間 | 5,453 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 31 | 
コンパイルメッセージ
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 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.Reverse().Select(x => string.Join(" ", x))));
    }
}
            
            
            
        
            
keymoon