uva 146 next

xiaoxiao2021-02-28  33

点击打开链接

//next_permutation的运用 #include<bits/stdc++.h> //万能头文件,包含c++所有头文件 using namespace std; int main() { char s[100]; while(scanf("%s",s)==1&&s[0]!='#') { int len=strlen(s); printf("%s\n",next_permutation(s,s+len)?s:"No Successor"); } return 0; }
转载请注明原文地址: https://www.6miu.com/read-2632245.html

最新回复(0)