上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 31 下一页
摘要: #include#include#include#includeusing namespace std;int s[55][55][55];int used[55][55][55];int bzx[55]={1,-1,0,0,0,0};int bzy[55]={0,0,1,-1,0,0};int b... 阅读全文
posted @ 2014-08-07 21:59 2014acm 阅读(99) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int n,m, a[10];void DFS(int k){ if (k>n) { for (int i=1; i>n; DFS(1); return 0; }View Code#incl... 阅读全文
posted @ 2014-08-06 12:29 2014acm 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 数据结构:图的DFS遍历时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte 总提交:259 测试通过:183描述 从已给的连通图中某一顶点出发,沿着一些边访遍图中所有的顶点,且使每个顶点仅被访问一次,就叫做图的遍历。图的遍历的遍历有DFS和... 阅读全文
posted @ 2014-08-06 12:26 2014acm 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 描述输入二个整数a和b(2main(){ int a,b,max,min,n,m=0,i; while(scanf("%d%d",&a,&b)!=EOF) { max=a>b?a:b; min=a=min) { for... 阅读全文
posted @ 2014-08-05 23:54 2014acm 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 阶乘之和时间限制:3000 ms | 内存限制:65535 KB 难度:3描述 给你一个非负数整数n,判断n是不是一些数(这些数不允许重复使用,且为正数)的阶乘之和,如9=1!+2!+3!,如果是,则输出Yes,否则输出No;输入第一行有一个整数0int main( ){ int m,n,i,k... 阅读全文
posted @ 2014-08-05 23:44 2014acm 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 另一种阶乘问题时间限制:3000 ms | 内存限制:65535 KB 难度:1描述 大家都知道阶乘这个概念,举个简单的例子:5!=1*2*3*4*5.现在我们引入一种新的阶乘概念,将原来的每个数相乘变为i不大于n的所有奇数相乘例如:5!!=1*3*5.现在明白现在这种阶乘的意思了吧!现在你的任... 阅读全文
posted @ 2014-08-05 23:43 2014acm 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 5个数求最值时间限制:1000 ms | 内存限制:65535 KB 难度:1描述 设计一个从5个整数中取最小数和最大数的程序输入输入只有一组测试数据,为五个不大于1万的正整数输出输出两个数,第一个为这五个数中的最小值,第二个为这五个数中的最大值,两个数字以空格格开。样例输入1 2 3 4 5样... 阅读全文
posted @ 2014-08-05 23:42 2014acm 阅读(121) 评论(0) 推荐(0) 编辑
摘要: #includeint main(){int m,n,i,j,a,b;scanf("%d\n",&m);while(m--) // m组数据 { int sum=0; scanf("%d\n",&n); // 某一组 n个数 for(i=0;i<n;i+... 阅读全文
posted @ 2014-08-05 23:41 2014acm 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std;bool cmp(int a,int b){ return a>b; }int main(){ int n,i; cin>>n; vector a(n); for(i=0;... 阅读全文
posted @ 2014-08-05 23:20 2014acm 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 字符串 统计 ,删除,连接,变换 - 2014年 - 博客园http://www.cnblogs.com/wc12436109/p/3872210.html?method=show&page=3#include void delchar(char*s,char c){ char *p=s ;... 阅读全文
posted @ 2014-08-05 22:05 2014acm 阅读(166) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 31 下一页