Problem swapsort
User ensonchew
Submission Time 2025-05-29 16:45:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swapsort.cpp:6:1: error: expected initializer before ‘int’
6 | int Q;
| ^~~
swapsort.cpp: In function ‘int main()’:
swapsort.cpp:17:10: error: ‘P’ was not declared in this scope
17 | cin >> P[i];
| ^
swapsort.cpp:20:9: error: ‘Q’ was not declared in this scope
20 | cin >> Q;
| ^
swapsort.cpp:23:8: error: ‘P’ was not declared in this scope
23 | swap(P[L], P[R]);
| ^
swapsort.cpp:30:11: error: ‘P’ was not declared in this scope
30 | cout << P[k] << ' ';
| ^