博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Sicily 4495. Print permutations
阅读量:7059 次
发布时间:2019-06-28

本文共 314 字,大约阅读时间需要 1 分钟。

按字典序生成字符串的全排列

直接递归:

 

#include 
#include
#include
using namespace std;int len;bool ever[9];string str;void permutation(string cur){ if(cur.size() == len) { cout<
<
>str) { memset(ever,0,sizeof(ever)); len = str.size(); permutation(""); } return 0;}

 

 

转载地址:http://hufll.baihongyu.com/

你可能感兴趣的文章
C++ 精度
查看>>
61、Heartbeat V1基于NFS共享存储的WEB高可用实战
查看>>
泛型数组问题
查看>>
Cisco HSRP排错
查看>>
Linux下查看tomcat连接数
查看>>
java 对象池
查看>>
成长中必须知道的20个故事
查看>>
aix下设置自动启动、关闭oracle
查看>>
Ocs 2007 迁移到 Lync的一些注意事项
查看>>
我的友情链接
查看>>
bash的字符处理工具及bash特性
查看>>
Input Director 一套键盘鼠标同时控制多台电脑
查看>>
Failure [INSTALL_FAILED_INVALID_APK]
查看>>
java 写入文件
查看>>
为什么你不能在 MySQL 3.x 版本上安装 Joomla 1.5.23
查看>>
PS(photoshop)抠图(切图)必备快捷键及要点简析
查看>>
Java拾遗:003 - ConcurrentHashMap源码解读
查看>>
关于无梦生
查看>>
查看Postgresql的连接状况
查看>>
vim tab设置
查看>>