전체 글

취업 준비하면서 공부하던 블로그인데, 이제 나이가 먹어가니까 사는 준비도 해야해서 이거저거 씁니다.
알고리즘 문제 풀이/1DP_과제(~180615)

180302_9465_스티커

//https://www.acmicpc.net/problem/9465 #include #include using namespace std;int score[2][100001];int dp[2][100001];int main(){ int t; cin >> t; for(int tc=0; tc> n; for(int i=1; i> score[0][i]; for(int i=1; i> score[1][i]; dp[0][1]=score[0][1]; dp[1][1]=score[1][1]; dp[0][2]=score[1][1]+score[0][2]; dp[1][2]=score[0][1]+score[1][2]; for(int i=2; 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]

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

180228_10430_나머지

#include using namespace std; class func{ int A,B,C; public : void input(){ cin >> A >> B >> C; } void operation(){ cout

bong sue
수봉수봉 신변잡기