摘要: 输入n输出1到n这个集合中包含的所有子集/*//方法一://思路:构造一个位向量visit,而不是直接构造子集A本身#include<iostream>using namespace std;void fun(int *visit, int cur, int n){ if(cur == n+1) { for(int i = 1;i <= n;++ i) if(visit[i]) cout << i << ' '; cout<<endl; return; } visit[cur]... 阅读全文
posted @ 2012-11-01 22:26 可笑痴狂 阅读(2968) 评论(1) 推荐(0)
摘要: Sorting It All OutTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 21865Accepted: 7529DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A, B, C, 阅读全文
posted @ 2012-11-01 16:45 可笑痴狂 阅读(508) 评论(0) 推荐(0)