하하하하 웃어요

  • 홈
  • 태그
  • 방명록

BFS 3

1926 그림

#include #include using namespace std; typedef struct { int row; int column; } dot; int dr[] = {0, 0, -1, 1}; int dc[] = {1, -1, 0, 0}; int n, m; int graph[500][500] = {-1, }; bool check[500][500] = {false, }; int pictureNum; int picture[250 * 500] = {0, }; int bfs(dot start) { queue q; q.push(start); check[start.row][start.column] = true; int pictureSize = 1; while (!q.empty()) { dot next = q.f..

알고리즘/백준 2020.10.12

2251 물통

#include #include using namespace std; typedef struct { int A; int B; int C; } Bucket; int A, B, C; bool check[201][201] = {false, }; bool answer[201] = {false, }; void bfs(Bucket start) { queue q; q.push(start); while (!q.empty()) { Bucket next = q.front(); q.pop(); if (check[next.A][next.B]) { continue; } else { check[next.A][next.B] = true; } if (next.A == 0) { answer[next.C] = true; } // A -..

알고리즘/백준 2020.10.12

2234 성곽

#include #include #include #include using namespace std; typedef struct { int m; int n; } dot; int m, n; // m: row, n: column int graph[50][50] = {0, }; bool check[50][50] = {false, }; // west, north, east, south int dm[] = {0, -1, 0, 1}; int dn[] = {-1, 0, 1, 0}; int roomNum; int room[2501] = {0, }; // room[roomNum] = roomSize int bfs(dot start) { queue q; q.push(start); check[start.m][start.n]..

알고리즘/백준 2020.10.12
1
더보기
프로필사진

  • 분류 전체보기 (15)
    • 시스템 프로그래밍 (6)
      • xv6 (0)
      • Operating Systems: Three Ea.. (5)
      • 리눅스 (1)
    • 빅데이터 (0)
      • 빅데이터를 지탱하는 기술 (0)
    • 알고리즘 (9)
      • 백준 (9)
    • 기타 (0)
      • 일상 (0)
      • 기타 지식 (0)
      • 취업 (0)

Tag

카탈란수, 큰수, dfs, BFS, OS, 백트래킹, wsl2, 운영체제, WSL, 깊이우선탐색, dp, 백준, 리눅스, 커널컴파일,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/07   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바