격자판의 숫자 이어 붙이기

알고리즘 문제 풀이/1DP_과제(~180615)

180126_2819_격자판의 숫자 이어 붙이기

#include using namespace std;int map[4][4];bool visitednum[10000000];int dy[4]={0,0,1,-1};int dx[4]={1,-1,0,0}; int cnt; int dfs(int y, int x, int depth, int now){ if(depth==7) { if(!visitednum[now]) {visitednum[now]=1; cnt++;} return 0; } now*=10; now+=map[y][x]; for(int i=0; i=0 && ny=0 && nx> tc; for(int t=1; t

bong sue
'격자판의 숫자 이어 붙이기' 태그의 글 목록