You are viewing a single comment's thread. Return to all comments →
int main() {
int t,i; cin >> t; string s; for(i=0;i<t;i++) { cin >> s; bool val = next_permutation(s.begin(), s.end()); if (val == false) { cout << "no answer" << endl; } else { cout << s << endl; }
}
return 0;
Seems like cookies are disabled on this browser, please enable them to open this website
Bigger is Greater
You are viewing a single comment's thread. Return to all comments →
int main() {
}
}