분류 전체보기

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

171102_2178_미로탐색

#include #include using namespace std; struct cord { int x; int y; }; bool map[102][102]; int visited[102][102]; void input_map(int N, int M) { char c; for (int i = 1; i c; if (c == '1') map[i][j] = 1; else map[i][j] = 0; } } int solv_maze(int n, int m, cord s) { //int cnt = 0; queue q; q.push(s); cord next; cord now = q.front(); visited[now.y][now.x] = 1; while (!q.empty()) { now = q.front(); q..

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

171101_회문1

123456789101112131415161718192021222324252627282930313233343536373839404142#include using namespace std; int main(){ for(int T=1; T> N; for(int i=0; i map[i][j]; for(int i=0; i

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

171031_string

12345678910111213141516171819202122232425262728293031#include #include using namespace std; int main(){ for(int T=0; T> T; string key; string str; char key_1[10]={0}; char str_1[1000]={0}; cin >> key_1 >> str_1; key=key_1; str=str_1; int key_l=key.size(); int str_l=str.size(); int cnt = 0; for(int i=0; i

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

171031_sum

123456789101112131415161718192021222324252627282930313233343536373839#include using namespace std;int m(int a, int b) {return a>=b ? a:b;}int main(){ for(int T=0;T

bong sue
'분류 전체보기' 카테고리의 글 목록 (57 Page)