Problem lengthsort
User zhaoqihui
Submission Time 2024-04-27 10:50:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lengthsort.cpp: In function ‘int main()’:
lengthsort.cpp:9:45: error: expected ‘;’ before ‘int’
9 | ios_base::sync_with_stdio (false);cin.tie(0)
| ^
| ;
10 | int n;
| ~~~
lengthsort.cpp:11:8: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
11 | cin>> n;
| ^
| yn
lengthsort.cpp:14:8: error: ‘arr’ was not declared in this scope
14 | cin>>arr[i]
| ^~~
lengthsort.cpp:16:13: error: ‘arr’ was not declared in this scope
16 | stable_sort(arr,arr+n,cmp);
| ^~~
lengthsort.cpp:19:15: error: expected primary-expression before ‘,’ token
19 | cout<<arr[i]<,'\n';
| ^