Problem | catsort |
---|---|
User | Batigol |
Submission Time | 2024-08-01 18:14:11 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
catsort.cpp: In function ‘int main()’:
catsort.cpp:12:34: error: ‘arr’ was not declared in this scope
12 | for(ll i = 0; i<n; i++) cin>>arr[i];
| ^~~
catsort.cpp:16:16: error: ‘arr’ was not declared in this scope
16 | if(arr[i]!=i) res+=abs(arr[i]-i);
| ^~~
catsort.cpp:20:20: error: ‘arr’ was not declared in this scope
20 | while(l<n&&arr[l]!=l){
| ^~~
catsort.cpp:22:22: error: ‘arr’ was not declared in this scope
22 | }while(r>=0&&arr[r]!=r){
| ^~~