会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
禅境花园
新博客 http://xiang578.github.io/
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
33
34
35
36
37
2015年1月30日
uva 539 The Settlers of Catan
摘要: 求最大长度,刚开始没有用use数组,和两个数组遍历,超时。网上查了一下用数组,再改成一个循环遍历过去就好了。#include "stdio.h"#includeint city[30][30],max,n,m,use[30][30];//city保存输入的连接关系,use 0为走过,1走过,max最...
阅读全文
posted @ 2015-01-30 11:37 xryz
阅读(157)
评论(0)
推荐(0)
2015年1月28日
zoj 1016 Parencodings
摘要: #include "stdio.h"#include "string.h"int main(){ int n,cas,i,j,p[25],w[25],right,left,temp,cnt; char s[100]; scanf("%d",&cas); while(cas--...
阅读全文
posted @ 2015-01-28 15:31 xryz
阅读(113)
评论(0)
推荐(0)
zoj 1002 Fire Net
摘要: #include "stdio.h"int map[5][5],max,n;//map输入的地图,max最大碉堡数,n地图大小bool set(int x,int y)//判断是否可以放置碉堡,只考虑当前空格左上角的情况{ int i; for(i=x-1; i>=0; i--) ...
阅读全文
posted @ 2015-01-28 10:48 xryz
阅读(112)
评论(0)
推荐(0)
2015年1月27日
zoj 1149 Dividing
摘要: 刚开始,将输入的每种价值的大理石都%2。以为是剪枝,后来和同学交流才发现,当数据为 0 0 2 0 0 1 是错误的。改了一下代码才AC。下次不要犯这些小错误了……#include "stdio.h"#include "string.h"//ave每个人应该获得大理石价值//a1-a6记录各种大理石...
阅读全文
posted @ 2015-01-27 22:18 xryz
阅读(159)
评论(0)
推荐(0)
zoj 2060 Fibonacci Again
摘要: #include "stdio.h"int main(){ int n; while(~scanf("%d",&n)) { if((n-2)%4==0) printf("yes\n"); else printf("no\n"); } return 0;} ...
阅读全文
posted @ 2015-01-27 21:15 xryz
阅读(121)
评论(0)
推荐(0)
2014年12月6日
hdu 5138 CET-6 test
摘要: hdu 5138 CET-6 test#includeint main(){ int n,f; while(~scanf("%d",&n)) { f=0; if(n-15>0) {if(f!=0) printf(" ");printf("%d",n-15...
阅读全文
posted @ 2014-12-06 22:01 xryz
阅读(119)
评论(0)
推荐(0)
hdu 5123 who is the best?
摘要: hdu 5123 who is the best?#include#includeint main(){ int t,n,a[105],i,j,max,b; while(~scanf("%d",&t)) while(t--) { memset(a,0,s...
阅读全文
posted @ 2014-12-06 18:18 xryz
阅读(121)
评论(0)
推荐(0)
hdu 5104 Primes Problem
摘要: hdu5104 Primes Problem#includeint prime(int m){ int i; for(i=2;i*i<=m;i++) { if(m%i==0) return 0; } return 1;}int main(){ in...
阅读全文
posted @ 2014-12-06 12:10 xryz
阅读(119)
评论(0)
推荐(0)
上一页
1
···
33
34
35
36
37
公告