Problem | sort |
---|---|
User | VNHbest |
Submission Time | 2024-07-04 16:51:22 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
sort.cpp:2:1: error: ‘cin’ does not name a type
2 | cin >> n;
| ^~~
sort.cpp:3:1: error: ‘string’ does not name a type
3 | string s;
| ^~~~~~
sort.cpp:4:8: error: expected constructor, destructor, or type conversion before ‘(’ token
4 | getline(cin, s);
| ^
sort.cpp:5:1: error: ‘vector’ does not name a type
5 | vector<int> arr;
| ^~~~~~
sort.cpp:6:1: error: ‘stringstream’ does not name a type
6 | stringstream ss(s);
| ^~~~~~~~~~~~
sort.cpp:8:1: error: expected unqualified-id before ‘while’
8 | while (ss >> x) {
| ^~~~~
sort.cpp:11:5: error: expected constructor, destructor, or type conversion before ‘(’ token
11 | sort(arr.begin(), arr.end());
| ^
sort.cpp:12:1: error: expected unqualified-id before ‘for’
12 | for (int i : arr) {
| ^~~