백준_사과와_바나나

📌BOJ 알고리즘 트레이닝

DP-3114번 사과와 바나나

#include #include #include #include using namespace std; const int MAX_N = 1500; int N, M; //누적합보다 메모리가 2배 더소요됨 다음에 재풀이할때는 누적합 방식을 사용할것.. int cache[MAX_N + 1][MAX_N + 1]; int cacheY[MAX_N + 1][MAX_N + 1]; int cacheX[MAX_N + 1][MAX_N + 1]; //string 2차원 배열로 선언 string arr[MAX_N + 1][MAX_N + 1]; int goY[3] = { 1,1,0 }; int goX[3] = { 1,0,1 }; bool isinmap(int y, int x) { if (yN || xM) return false; ..

newdeal
'백준_사과와_바나나' 태그의 글 목록