알고리즘 문제 풀이/1DP_과제(~180615)
2018.04.23
//https://www.acmicpc.net/problem/10814#include #include #include #include #include using namespace std; struct cus{ int age; int idx; char *name[20];}; bool cmp(cus a, cus b){ if(a.age < b.age) return true; if(a.age==b.age){ return a.idx
알고리즘 문제 풀이/1DP_과제(~180615)
2018.04.23
//https://www.acmicpc.net/problem/11004 #include #include #include #include using namespace std; int main(){ int n, k; vector v; scanf("%d %d", &n, &k); k--; for(int i=0; i
알고리즘 문제 풀이/1DP_과제(~180615)
2018.04.23
//https://www.acmicpc.net/problem/11650 #include #include #include #include using namespace std; struct xy{ int x; int y;}; bool cmp(xy a, xy b){ if(a.x < b.x) return true; else if(a.x==b.x) return a.y
알고리즘 문제 풀이/1DP_과제(~180615)
2018.04.23
//https://www.acmicpc.net/problem/1181 #include #include #include #include using namespace std; bool cmp(string a, string b){ if(a.size() n; vector v; for(int i=0; i> s; v.push_back(s); } sort(v.begin(), v.end(), cmp); cout