1032

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

180424_1032_베스트셀러

//https://www.acmicpc.net/problem/1032 #include #include #include #include using namespace std; struct book{ int idx; int cnt; string title; book(); book(int idx, string title, int cnt) : idx(idx), title(title), cnt(cnt) {}}; bool cmp(book a, book b){ if(a.cnt != b.cnt) return a.cnt> b.cnt; else { if(a.title.compare(b.title) < 0) return true; //사전 순으로 a가 b의 앞일 때 else return false; }}int main(){ ..

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

171126_1032_명령 프롬프트

//https://www.acmicpc.net/problem/1032 #include #include using namespace std; int main(){ string str1, str2; int N; cin >> N >> str1; int l=str1.size(); bool chk[51]={1,}; if(N==1) {cout str2; for(int j=0; j

bong sue
'1032' 태그의 글 목록