文章

3

粉丝

0

获赞

2

访问

427

头像
全排列 题解:next_permutation通解全排列
P1185 中国矿业大学/北京大学机考题
发布于2026年3月23日 22:37
阅读数 120

#include<bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin>>s;
    do{
        cout<<s<<endl;
    }while(next_permutation(s.begin(),s.end()));
    return 0;
}

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发