使用此代码时:
for(int i=0; i<line; i++) {
next_permutation(nums, nums+N);
if(DEBUG) {
for(int j=0; j<N; j++) {
cout << nums[j] << " ";
}
}
}
我得到以下输出:-1076591092_1_2_4_3_-1076591092 _1_3_2_4_
Int his case, line would be 3, and N is 5; Thanks!