13261번: 탈옥 - DP(DnC Opt)
DP - Divide and Conquer Optimization 기본 문제#include using namespace std;typedef long long ll;typedef pair pii;typedef pair pll;typedef tuple tiii;const ll INF = 1e18;const int MAXL = 8001;const int MAXG = 801;int L, G;ll psum[MAXL];ll dp[MAXG][MAXL]; //dp[i][j] : i번째 간수까지 j번째 칸을 감시할 때 탈옥 위험도의 최솟값//s, e : dp[i][m]를 최소로 만들어 주는 위치 opt의 범위void solve(int s, int e, int l, int r, int i){ if(l > r) re..
알고리즘/baekjoon
2024. 8. 13. 19:42