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
//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
//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
//https://www.acmicpc.net/problem/2605 #include #include using namespace std;int students[101];int ans[101];int n;void order(){ int x; cin >> n >> x; ans[1]=1; for(int i=2; i> x; for(int j=i-1; j>=i-x; j--){ ans[j+1]=ans[j]; } ans[i-x]=i; }} void output(){ for(int i=1; i