会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
禅境花园
新博客 http://xiang578.github.io/
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
27
28
29
30
31
32
33
34
35
···
37
下一页
2015年3月25日
02-线性结构3. Pop Sequence
摘要: 题目有一点要注意,就是样例的第五组:1 7 6 5 4 3 2 1可以先出,23456入栈之后,7不能入栈了,所以是不行的 杭电1022有差不多的图可以理解一下 用stl写的,c太麻烦不想写#include#include#include#include#include#includ...
阅读全文
posted @ 2015-03-25 22:51 xryz
阅读(163)
评论(0)
推荐(0)
2015年3月23日
03-树1. List Leaves
摘要: 题意:先输入总节点数N,之后N行数据代表第i行的左右儿子,输出所有树叶的编号,从上到下,从左到右。/* ***********************************************Author :xryzEmail :523689985...
阅读全文
posted @ 2015-03-23 22:12 xryz
阅读(127)
评论(0)
推荐(0)
hdu 1000-1099计划(31)
摘要: 为了最近的比赛,决定在杭电上练习,为了防止自己又在那里找那些水题来写,采用一版一版的写,目前觉得也就写完第一和十一版吧。这样来有一点不错,难易题目都有涉及,虽然总体偏易,练练手还是不错的。大概这篇会不停的更新,希望可以在五一前完成这个愿望,实在不行,五一三天补完。1000 oj入门经...
阅读全文
posted @ 2015-03-23 12:28 xryz
阅读(119)
评论(0)
推荐(0)
2015年3月16日
00-自测3. 数组元素循环右移问题
摘要: #include#include#include#include#includeusing namespace std;int main(){ int a[150],n,m,i,j,temp; while(~scanf("%d%d",&n,&m)) { for(i=0...
阅读全文
posted @ 2015-03-16 20:27 xryz
阅读(160)
评论(0)
推荐(0)
2015年3月15日
hdu 1237 简单计算器 栈
摘要: 这个题目是大部分人都是用栈来写的,本周训练老师也讲了两次栈的原理。自己最近也看了数据结构中与栈有关的内容,还是比较深刻理解了没有括号情况下表达式求解。#include#include#includeusing namespace std;char s[250],post[250];/...
阅读全文
posted @ 2015-03-15 20:47 xryz
阅读(173)
评论(0)
推荐(0)
Nth Largest Value
摘要: 题目看起来比较难,写起来比较简单。#include#include#includeusing namespace std;struct data{ char s[100]; int num;}a[25];bool cmp(data x,data y){ return x.num=1...
阅读全文
posted @ 2015-03-15 18:14 xryz
阅读(222)
评论(0)
推荐(0)
zoj 2109 FatMouse' Trade
摘要: #include#include#include#include#includeusing namespace std;struct data{ double j,f,x;}a[1024];bool cmp(data a,data b){ return a.x>b.x;}int main...
阅读全文
posted @ 2015-03-15 18:10 xryz
阅读(130)
评论(0)
推荐(0)
2015年3月14日
01-2. Maximum Subsequence Sum
摘要: #include#include#include#include#includeusing namespace std;int main(){ int n,a[10000],maxx,t,i,frist,last,refrist; while(~scanf("%d",&n...
阅读全文
posted @ 2015-03-14 19:28 xryz
阅读(114)
评论(0)
推荐(0)
2015年3月13日
00-自测2. 素数对猜想
摘要: #includeint isprime(int n){ int i; if(n==1) return 0; if(n==2) return 0; for(i=2;i*i<=n;i++) { if(n%i==0) break; } ...
阅读全文
posted @ 2015-03-13 19:43 xryz
阅读(118)
评论(0)
推荐(0)
01-1. 最大子列和问题
摘要: 按照老师讲的第四种算法实现的,时间复杂度为n。 第二种方法应该会超时…… 分治下次学习之后再写。#include#include#include#include#includeusing namespace std;int main(){ int n,a[100005],i,M...
阅读全文
posted @ 2015-03-13 18:58 xryz
阅读(120)
评论(0)
推荐(0)
上一页
1
···
27
28
29
30
31
32
33
34
35
···
37
下一页
公告