会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
禅境花园
新博客 http://xiang578.github.io/
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
28
29
30
31
32
33
34
35
36
37
下一页
2015年3月11日
00-自测1. 打印沙漏
摘要: 这个题目居然写了半个多小时…… 实在不行啊,代码还是比较丑……#includeint main(){ int i,j,t,n,a[25],m,k; char c; a[1]=1; t=3; for(i=2;i=1;i++) { ...
阅读全文
posted @ 2015-03-11 23:08 xryz
阅读(161)
评论(0)
推荐(0)
2015年3月10日
zoj 3702 Gibonacci number
摘要: 所有数据都用longlongint才过,之前错了13次#includeint main(){ long long int ans,cas,i,j,t,m[50],n[50],g1; m[1]=0;m[2]=1; n[1]=1;n[2]=1; for(i=3;i...
阅读全文
posted @ 2015-03-10 17:11 xryz
阅读(141)
评论(0)
推荐(0)
2015年3月9日
zoj 1005 Jugs
摘要: 只要求输出一种答案,所以假设最后是在B里面实现结果。 不停从B倒水到A,分类考虑B中剩余水与A的大小情况 模拟题目想不到解法还是比较坑的啊#includeint main(){ int a,b,n,ans; while(~scanf("%d%d%d",&a,&b,&n))...
阅读全文
posted @ 2015-03-09 21:17 xryz
阅读(113)
评论(0)
推荐(0)
zoj 3775
摘要: 题目看了半天没有看明白,后来查了一下。主要是!和_两个符号有用。!新字符串中输出一个hello, world!(直接从页面上复制过去好了,中间有个空格)。另一个符号是将输入的字符重复一遍。题意最后是比较新字符串和输入的字符串是否一样。#include#include#include#...
阅读全文
posted @ 2015-03-09 21:13 xryz
阅读(134)
评论(0)
推荐(0)
2015年3月8日
zoj 1239 Hanoi Tower Troubles Again!
摘要: 题意:告诉你有多少根柱子,让你计算最多能按要求放几个盘子。要求相邻盘子编号和为平方数。找规律,一跟柱子为1个,两根为3个,三根为7个,4根为11个。大胆猜想规律为每次相加2、4、4、6、6、8、8。 最后猜对了……#includeint main(){ int t,n,i,a[...
阅读全文
posted @ 2015-03-08 19:44 xryz
阅读(129)
评论(0)
推荐(0)
zoj 1221 Risk
摘要: 搜索入门题,完全理解搜索后没有什么难度。不过自己在细节处理上还是花了很多时间#include#include#includeint vis[25][25],ans,y,use[25];void dfs(int x,int cnt){ int i; if(x==y) ...
阅读全文
posted @ 2015-03-08 13:25 xryz
阅读(158)
评论(0)
推荐(0)
2015年2月24日
uva 10192 Vacation
摘要: lcs,用gets读入#include#include#include#include#includeusing namespace std;int main(){ int i,j,n1,n2,dp[110][110],cas=0; char a[110],b[110];...
阅读全文
posted @ 2015-02-24 11:09 xryz
阅读(91)
评论(0)
推荐(0)
uva 10066 The Twin Towers
摘要: lcs,答案输出后有一个空行……#include#include#include#include#includeusing namespace std;int main(){ int a[110],b[110],i,j,n1,n2,dp[110][110],cas=0; ...
阅读全文
posted @ 2015-02-24 10:51 xryz
阅读(78)
评论(0)
推荐(0)
2015年2月23日
uva 531 Compromise
摘要: LCS,输出还是没有想出来。#include#include#includeusing namespace std;int f[110][110],dp[110][110];char s1[110][35],s2[110][35];bool flag;void fun(int i,i...
阅读全文
posted @ 2015-02-23 16:17 xryz
阅读(98)
评论(0)
推荐(0)
2015年2月22日
uva 103 Stacking Boxes
摘要: DAG最长路算法 刚开始没有想到的是如何保存路径,自己想了用两个数组记录,想想就觉得比较麻烦,所以放弃了。最后看了其他人的代码由一个数组记录,每个数组的元素记录下一个的下标。#include#include#include#include#includeusing namespace...
阅读全文
posted @ 2015-02-22 19:29 xryz
阅读(110)
评论(0)
推荐(0)
上一页
1
···
28
29
30
31
32
33
34
35
36
37
下一页
公告