Problem swapsort
User Lsc111
Submission Time 2023-05-30 17:34:44
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swapsort.cpp: In function ‘int main()’:
swapsort.cpp:2:2: error: ‘ios’ has not been declared
2 | ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
| ^~~
swapsort.cpp:2:27: error: ‘cin’ was not declared in this scope
2 | ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
| ^~~
swapsort.cpp:2:39: error: ‘cout’ was not declared in this scope
2 | ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
| ^~~~
swapsort.cpp:17:9: error: ‘swap’ was not declared in this scope
17 | swap(arr[l-1], arr[r-1]);
| ^~~~
swapsort.cpp:34:20: error: ‘endl’ was not declared in this scope
34 | cout << ans << endl;
| ^~~~