백준

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

180210_3055_탈출

//https://www.acmicpc.net/problem/3055 #include #include #include using namespace std;char map[52][52];int visited[52][52];int R, C;int sy1, sx1, desy, desx;bool wchk;int cnt;int dy[4]={0,0,1,-1};int dx[4]={1,-1,0,0};queue water; void input(){ cin >> R >> C; for(int i=0; i> map[i]; } void find_start_point(){ for(int i=0; i q; q.push(make_pair(sy1,sx1)); int cnt2=0; int tmp=cnt; int tmp2=..

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

180210_1018_체스판 다시 칠하기

//https://www.acmicpc.net/problem/1018 #include #include using namespace std;int N, M, mn;char map[50][50]; void input(){ cin >> N >> M; for(int i=0; i> map[i];} int painting_white_fst(int y, int x){ int cnt=0; for(int i=y; i> M; for(int i=0; i> map[i];} int painting_white_fst(int y, int x){ int cnt=0; for(int i=y; i

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

180209_3052_나머지

//https://www.acmicpc.net/problem/3052 #include using namespace std;int num[1001];int main(){ int mx=0; int ans=0; for(int i=0; i> A; num[A%42]++; if(A>mx) mx=A; } for(int i=0; i0) ans++; } cout

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

180208_1963_소수 경로

//https://www.acmicpc.net/problem/1963 #include #include using namespace std;int T,a,b;int num[9000]; void input(){ cin >> a >> b;} void init(){ for(int i=0; i0) cout

bong sue
'백준' 태그의 글 목록 (14 Page)