UVa-729-The Hamming Distance Problem
来源:互联网 发布:聚合数据平台 编辑:程序博客网 时间:2024/06/09 21:26
AOAPC I: Beginning Algorithm Contests (Rujia Liu) :: Volume 3. Brute Force :: Elementary Skills
// 729 - The Hamming Distance Problem#include <iostream>#include <algorithm>#include <cstring>using namespace std;int main(void){int i, j, t, n, h;int a[20];while(cin >> t){while(t--){cin >> n >> h;memset(a, 0, sizeof(a));for(i=0; i<h; i++)a[n-1-i] = 1;do{for(j=0; j<n; j++)cout << a[j];cout << endl;}while(next_permutation(a, a+n));if(t != 0) 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
- Base64笔记
- 江苏金湖大华自动化仪表有限公司 公司简介
- Android之Socket的基于UDP传输的创建步骤
- 个人联系方式
- poj 百练2950 摘花生
- UVa-729-The Hamming Distance Problem
- 左连接、右连接、交叉连接、全外连接
- 发的个电饭锅的符合规范感觉好几个
- 2014/08/14——家才训练计划不更新?
- Oil Skimming(二分图)
- 从文本文件逐行读入数据
- Problem D:Cross the maze google 2014
- Unity3D研究院之主角面朝方向一定区域内对象角度计算
- hd 2192 MagicBuilding——不要被样例吓到