6593 상범 빌딩
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102#include #include #include #include using namespace std; int level, row, col;int st_y, st_x, st_h;int end_y, end_x, end_h; int dh[6] = { 0,0,0,0,1 , -1};int dx[6] = { 1,-1,0,0,0 ,0};int dy[6] = { 0,0,..
2020. 3. 12.
2589 보물섬
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374#include #include #include using namespace std; char arr[55][55] = {0};char chk[55][55] = { 0 };int dx[4] = { 1,-1,0,0 };int dy[4] = { 0,0,1,-1 };int row, col; typedef struct _dot { int len; int y; int x;}dot; int bfs(int y, int x) { queue q; memcpy(chk, arr,..
2020. 1. 19.
7569 토마토
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869#include #include #include using namespace std; queue q;// (date, h), (y,x) int dx[6] = {1,-1,0,0,0,0};int dy[6] = {0,0,1,-1,0,0};int dh[6] = {0,0,0,0,1,-1};int arr[105][105][105] = { 0 };int chk[105][105][105] = { 0 };void bfs(int col, int row, int height, int sum) { ..
2020. 1. 14.