You are viewing a single comment's thread. Return to all comments →
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ vector v; int n; cin >> n;
for (int i = 0; i < n; i++) { int element; cin >> element; v.push_back(element); } sort(v.begin(),v.end()); for (int i: v) { cout << i << " "; } return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Vector-Sort
You are viewing a single comment's thread. Return to all comments →
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
vector v; int n; cin >> n;
}