Submission #420318


Source Code Expand

using System;
class Program
{
	static int H,W;
	static char[][] map;
	static Boolean[][] reached;
	static void Main(string[] args)
	{
		string[] input = Console.ReadLine().Split(' ');
		H = int.Parse(input[0]);
		W = int.Parse(input[1]);
		map = new char[H][W];
		String tmp;
		for(int i = 0;i < H;i++){
			tmp = Console.ReadLine();
			for(int j = 0;j < W;j++){
				map[i][j] = tmp[j];
			}
		}
		foreach(Boolean a in reached){a = true};
		
		
	}
	
	static void Search(int x,int y){
		if(x<0 || W<= x || y < 0 || H <= y || map[x][y] == '#')return;
		if(reached[x][y])return;
		
		reached[x][y] = true;
		
		search(x + 1,y);
		search(x - 1,y);
		search(x,y + 1);	
		search(x,y - 1);
	}
}

Submission Info

Submission Time
Task A - 深さ優先探索
User shimau6
Language C# (Mono 3.2.1.0)
Score 0
Code Size 721 Byte
Status CE

Compile Error

./Main.cs(20,41): error CS1002: ; expected