백준

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

180302_9506_약수들의 합

//https://www.acmicpc.net/problem/9506 #include #include using namespace std; void process(int n){ int ans=1; int tmp[5000]; memset(tmp, 0, sizeof(int)*5000); tmp[0]=1; int index=1; for(int i=2; i

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

180302_2600_구슬게임

//https://www.acmicpc.net/problem/2600 #include using namespace std;bool dp[501][501];int b[3];int k[2][5];void find_dp(){ for(int i=0; i> b[0] >> b[1] >> b[2] ; find_dp(); for(int i=0; i> k[0][i] >> k[1][i]; } for(int i=0; i

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

180301_1931_회의실 배정

//https://www.acmicpc.net/problem/1931 #include #include #include using namespace std;#define lli long long int int main() { int n; cin >> n; vector arr; for(int i=0; i> a >> b; arr.push_back(pair(b,a)); } sort(arr.begin(), arr.end()); int cnt=1; int end=arr[0].first; for(int i=1; i

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

180301_1920_수 찾기

//https://www.acmicpc.net/problem/1920 #include #include using namespace std;int A[100001]; bool find_x(int x,int start, int end){ int m; while(end-start>=0){ m=(end+start)/2; if(A[m]==x) return true; if(A[m]

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