permutations
来源:互联网 发布:新手淘宝卖家论坛社区 编辑:程序博客网 时间:2024/06/06 14:06
#include <stdio.h>#include <string.h>#define SWAP(x,y,t) ((t)=(x),(x)=(y),(y)=(t))void perm(char *list,int k,int m){char temp;if(k==m){printf("%s\n",list);}else{for(int i=k;i<=m;i++){SWAP(list[i],list[k],temp);perm(list,k+1,m);SWAP(list[i],list[k],temp);}}}int main(){char list[1024];scanf("%s",list); perm(list,0,strlen(list)-1);return 0;}http://nodeoj.chinacloudapp.cn/P/2530
0 0
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- Permutations
- 关于ActionContext.getContext()的用法心得 2010-06-25 11:08 25041人阅读 评论(8) 收藏 举报 applicationsessionactionstr
- easyui弹出框位置超出
- mondrian 对计算结果 Infinity 的处理
- Python 字典
- 将网页嵌入到android应用中
- permutations
- 研发管理, 项目管理 相关资源网站积累
- linux中只列出目录项
- NSString常用方法
- 卸载oracle方法
- Asterisk
- 使用eagle导出PCB制造商可用的gerber文件
- [2015.2.6] 如果因为某种算法困难而畏惧而逃避,那么你将永远都不会这种算法,硬着头皮啃下这个算法!
- scanf()函数慎重使用