일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 수성못맛집
- 반복문
- C#
- 대구맛집
- 정렬
- 들안길삼겹살
- 수성못삼겹살
- 별찍기
- 대구데이트
- 서울맛집
- 백준
- 대구고깃집
- 범어동맛집
- BFS
- 수성구맛집
- 수성구데이트
- 앞산카페
- 대구삼겹살
- 압구정데이트
- 대명동맛집
- oracle
- 오라클
- 브루트 포스
- programmers
- SQL
- 안지랑카페
- 조건문
- 대구카페
- 프로그래머스
- 큐
- Today
- Total
목록BFS (4)
모든 일상

using System; using System.Collections; using System.Collections.Generic; namespace ConsoleApp3 { public class Program { static void Main(string[] args) { int size = int.Parse(Console.ReadLine()); int[,] value = new int[size, size]; int[,] visit = new int[size, size]; int[] dx = new int[4] { 1, 0, -1, 0 }; int[] dy = new int[4] { 0, 1, 0, -1 }; Queue q = new Queue(); // X,Y 축 위치 저장 Queue result ..

using System; using System.Collections; using System.Collections.Generic; namespace ConsoleApp3 { public class Program { static void Main(string[] args) { var input = Console.ReadLine().Split(); int size_y = int.Parse(input[0]); int size_x = int.Parse(input[1]); int test_case = int.Parse(input[2]); int[,] data = new int[100, 100]; int[,] visit = new int[100, 100]; int[] dx = new int[4] { 1, 0, -..

using System; using System.Collections; using System.Collections.Generic; namespace ConsoleApp3 { public class Program { static void Main(string[] args) { int test_case = int.Parse(Console.ReadLine()); int[] result= new int[test_case]; int[] dx = new int[8] {2, 2, 1, 1, -2, -2, -1, -1}; // 나이트 움직임 -> ((x 축 2칸 - y 축 1칸) or (x 축 1칸 + y축 2칸)) int[] dy = new int[8] {1, -1, 2, -2, 1, -1, 2, -2}; for ..

using System; using System.Collections; using System.Collections.Generic; namespace ConsoleApp3 { public class Program { static void Main(string[] args) { string[] input_data = Console.ReadLine().Split(); int start = int.Parse(input_data[0]); int end = int.Parse(input_data[1]); int[] visit = new int[200001]; // 0