BOJ

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

180423_1427_소트인사이드

//https://www.acmicpc.net/problem/1427 #include #include #include #include using namespace std; int main(){ string num; cin >> num; vector v; for(int i=0; i=0; i--){ cout

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

180423_1026_보물

//https://www.acmicpc.net/problem/1026 #include #include #include using namespace std; bool cmp(int a, int b){ return a>b;}int main(){ int n; cin>> n; vector A; vector B; for(int i=0; i> a; A.push_back(a); } for(int i=0; i> b; B.push_back(b); } sort(B.begin(), B.end()); sort(A.begin(), A.end(), cmp); int ans=0; for(int i=0; i

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

180423_2747_피보나치 수

//https://www.acmicpc.net/problem/2747 #include using namespace std; void memoization(int f[]);int search(int f[], int n);int main(){ int f[45]; memoization(f); int n; cin >> n; cout

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

180418_15683_감시

//https://www.acmicpc.net/problem/15683 #include using namespace std; int n, m, tv, mn;int map[8][8];int tvpos[8][3];void input();void dfs(int idx);void update();int main(){ input(); int num=4; if(map[tvpos[0][0]][tvpos[0][1]]==2) num=2; else if(map[tvpos[0][0]][tvpos[0][1]]==5) num=1; mn=64; for(int i=0; i n >> m; for(int i=0; i map[i][j]; if(0

bong sue
'BOJ' 태그의 글 목록 (4 Page)