๋ฌธ์ ๋๊ตด์ ์๋ ๋ฏธ๋ค๋์ ๋ชจ์๊ณผ ๋ ์ฌ๋์ด ๋์ง ๋ง๋์ ๋์ด๊ฐ ์ฃผ์ด์ง๋ค. ๋ชจ๋ ๋ง๋๋ฅผ ๋์ง๊ณ ๋ ์ดํ์ ๋ฏธ๋ค๋ ๋ชจ์์ ๊ตฌํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค. ์
๋ ฅ 1 5 6 . . . . . . . . X X . . . . X . . . . X X X X . 1 3 ์ถ๋ ฅ 1 . . . . . . . . . . . . . . X X . . . . X X . . . X X X X . ์ฝ๋ #include #include #include #include #define y first #define x second using namespace std; //2933๋ฒ ๋ฏธ๋ค๋ //2์ฐจ์ ๋ฐฐ์ด ์ ์ธ char arr[101][101]; int visited[101][101]; //dfs๋ฅผ ์ํ ๋ฐฉ๋ฌธ ๋ฐฐ์ด int R, C; ve..
[C++] BOJ 2933๋ฒ: ๋ฏธ๋ค๋
๋ฌธ์ ๋๊ตด์ ์๋ ๋ฏธ๋ค๋์ ๋ชจ์๊ณผ ๋ ์ฌ๋์ด ๋์ง ๋ง๋์ ๋์ด๊ฐ ์ฃผ์ด์ง๋ค. ๋ชจ๋ ๋ง๋๋ฅผ ๋์ง๊ณ ๋ ์ดํ์ ๋ฏธ๋ค๋ ๋ชจ์์ ๊ตฌํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค. ์
๋ ฅ 1 5 6 . . . . . . . . X X . . . . X . . . . X X X X . 1 3 ์ถ๋ ฅ 1 . . . . . . . . . . . . . . X X . . . . X X . . . X X X X . ์ฝ๋ #include #include #include #include #define y first #define x second using namespace std; //2933๋ฒ ๋ฏธ๋ค๋ //2์ฐจ์ ๋ฐฐ์ด ์ ์ธ char arr[101][101]; int visited[101][101]; //dfs๋ฅผ ์ํ ๋ฐฉ๋ฌธ ๋ฐฐ์ด int R, C; ve..
2022.06.13