#include
#include
using namespace std;
int main() {
int t;
cin >> t;
while(t–){
int n;
cin >> n;
int a[n];
for(int i=0; i<n; i++){
cin >> a[i];
}
next_permutation(a,a+n);
for(int i=0; i<n; i++){
cout << a[i];
}
}
return 0;
}
why is this code giving no answer?