Sea

알고리즘 문제 풀이/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

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

180106_3143_가장 빠른 문자열 타이핑

#include #include using namespace std; int main(){ int T; cin >> T; for(int i=1; i> a>> b; int la=a.size(); int lb=b.size(); int cnt=0; for(int j=0; j

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

171103_1221_GNS

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849#include #include using namespace std; int main(){ int T; cin >> T; for(int i=1; i> tc >> num; cout

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

171103_거듭제곱

123456789101112131415161718#include using namespace std;int sqr(int n, int m){ if(m>0) return n*sqr(n, m-1); else return 1;}int main(){ for(int T=1; T> i; int N, M; cin >> N >> M; cout

bong sue
'Sea' 태그의 글 목록