목록SWtest (10)
Deep Learning study
백준 13460문제
#include #include using namespace std; #define x first #define y second #define INF 1e9 #define WALL 100 int g[10][10]; pair r,b,h; int n,m; bool rdrop = false; bool bdrop = false; void move(pair *a,pair *b,int opt){ int &rx = (*a).x, &ry = (*a).y; int &bx = (*b).x, &by = (*b).y; if(opt == 0){//왼쪽 for(int i=0 ; i m; char c; for(int i=0 ;i c; if(c == '#') g[i][j] = WALL; else if(c == 'O') h.x = i..
백준 문제 코드
2019. 11. 21. 22:03
백준 14502문제
#include using namespace std; #define pb push_back int N,M; int X[4] = {0,0,1,-1}; int Y[4] = {1,-1,0,0}; int dfs(int x, int y,int arr[][11]){ int ret = 1; for(int i = 0; i = 1 && nextX 0 && nextY > N >> M; for(int i = 1 ; i arr[i][j]; if( arr[i][j] == 2) posV.pb(make_pair(i,j)); else if(arr[i][j] == 0) posZ.pb(make_pair(i,j)); else one..
백준 문제 코드
2019. 11. 12. 23:05