UVa 729 - The Hamming Distance Problem
来源:互联网 发布:爱普生打印机清零软件 编辑:程序博客网 时间:2024/05/16 09:57
传送门UVa 729 - The Hamming Distance Problem
水啊。。
#include <cstdio>#include <iostream>#include <algorithm>#include <string>using namespace std;int main(){//freopen("input.txt", "r", stdin);int n, a, b;scanf("%d", &n);while (n--){scanf("%d%d", &a, &b);string str1(a - b, '0');string str2(b, '1');str1 += str2;cout << str1 << endl;while (next_permutation(str1.begin(), str1.end()))cout << str1 << endl;if (n)cout << endl;}return 0;}
0 0
- UVa 729 The Hamming Distance Problem
- UVa 729 - The Hamming Distance Problem
- UVA 729 - The Hamming Distance Problem
- UVa 729 - The Hamming Distance Problem
- uva 729 - The Hamming Distance Problem
- uva 729 The Hamming Distance Problem
- UVa 729: The Hamming Distance Problem
- uva 729 The Hamming Distance Problem
- uva - 729 - The Hamming Distance Problem
- UVa 729 - The Hamming Distance Problem
- uva 729 - The Hamming Distance Problem
- uva 729 - The Hamming Distance Problem
- UVa 729 - The Hamming Distance Problem 排列组合
- UVa 729 - The Hamming Distance Problem
- UVa 729 - The Hamming Distance Problem
- UVA 729 - The Hamming Distance Problem
- UVa-729-The Hamming Distance Problem
- UVA - 729 The Hamming Distance Problem
- linux常用命令
- android SwipeRefreshLayout google自己的下拉刷新控件 (需要下载新的v4包)
- Core Data操作模板1
- 计算机相关顶级会议
- java子父类内部程序的执行顺序
- UVa 729 - The Hamming Distance Problem
- CVPR14 动作识别 Lie group manifold + 3D skeleton
- 在CSV文件导入到数据库时使用过的代码
- 如何删除多行首字母,Sublime Text多行编辑运用
- 关于状态变迁一致性接口高性能设计
- 当别人遇到困难的时候
- lamp 的php安装位置
- ado.net中的DataSet使用
- javascript常用属性