프로그래밍74 백준 1463(1로 만들기) https://www.acmicpc.net/problem/1463 동적계획법을 이용해 풀었습니다. mem[i] = mem[i-1] +1 은 우선 최댓값(?)을 먼저 넣습니다. 12345678910111213141516171819202122#include #include using namespace std; int main(){ int mem[1000001]; int N; cin >> N; mem[1] = 0; for(int i = 2; i 2018. 10. 29. 백준 3986(좋은 단어) https://www.acmicpc.net/problem/3986 스택으로 짜면 쉬울 거 같아 짜봤습니다. #include #include using namespace std;int main(){ios::sync_with_stdio(false);int N,ret = 0;cin >> N;for(int i= 0; i> str;for(int j = 0; j 2018. 10. 20. 이전 1 ··· 10 11 12 13 다음