会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Forrest
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
17
18
19
20
21
22
下一页
2016年11月26日
PAT A 1115. Counting Nodes in a BST (30)【二叉排序树】
摘要: 1115 题目:二叉排序树,统计最后两层节点个数 思路:数组格式存储,insert建树,dfs遍历 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; typed
阅读全文
posted @ 2016-11-26 00:17 demianzhang
阅读(393)
评论(0)
推荐(0)
2016年11月25日
PAT A 1118. Birds in Forest (25)【并查集】
摘要: 并查集合并 #include<iostream> using namespace std; const int MAX = 10010; int father[MAX],root[MAX]; int findfather(int x){ if(x==father[x]) return x; else
阅读全文
posted @ 2016-11-25 20:51 demianzhang
阅读(750)
评论(0)
推荐(0)
2016年11月24日
codeforces Round#381 div2
摘要: 第一题: 按余数分类,1,2,3分别由哪些基数组成 1—>[1][2+3][3+3+3] 2—>[1+1][2][3+3] 3—>[1+1+1][1+2][3] #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int max...
阅读全文
posted @ 2016-11-24 03:01 demianzhang
阅读(303)
评论(0)
推荐(0)
2016年11月23日
第六届福建省大学生程序设计竞赛(FZU2213—FZU2221)
摘要: from:piaocoder Common Tangents(两圆之间的公公切线) 题目链接: http://acm.fzu.edu.cn/problem.php?pid=2213 解题思路: 告诉你两个圆的圆心与半径,要你找出他们的公共切线的个数。 套模板即可。 http://blog.csdn.net/piaocoder/article/details/41649089 #include ...
阅读全文
posted @ 2016-11-23 19:01 demianzhang
阅读(218)
评论(0)
推荐(0)
CS224d assignment 1【Neural Network Basics】
摘要: refer to: 机器学习公开课笔记(5):神经网络(Neural Network) CS224d笔记3——神经网络 深度学习与自然语言处理(4)_斯坦福cs224d 大作业测验1与解答 CS224d Problem set 1作业 softmax: def softmax(x): assert
阅读全文
posted @ 2016-11-23 00:58 demianzhang
阅读(924)
评论(0)
推荐(0)
2016年11月22日
PAT A 1022. Digital Library (30)【结构体排序检索】
摘要: https://www.patest.cn/contests/pat-a-practise/1022 直接模拟, 输入,按id排序,检索 #include <iostream> #include <string> #include <algorithm> using namespace std; s
阅读全文
posted @ 2016-11-22 18:12 demianzhang
阅读(468)
评论(0)
推荐(0)
PAT A 1030. Travel Plan (30)【最短路径】
摘要: https://www.patest.cn/contests/pat-a-practise/1030 找最短路,如果有多条找最小消耗的,相当于找两次最短路,可以直接dfs,数据小不会超时。 #include<cstdio> #include<string> #include<cstring> #in
阅读全文
posted @ 2016-11-22 17:31 demianzhang
阅读(347)
评论(0)
推荐(0)
PAT A 1018. Public Bike Management (30)【最短路径】
摘要: https://www.patest.cn/contests/pat-a-practise/1018 先用Dijkstra算出最短路,然后二分答案来验证,顺便求出剩余最小,然后再从终点dfs回去求出路径 #include<cstdio> #include<string> #include<cstri
阅读全文
posted @ 2016-11-22 16:58 demianzhang
阅读(562)
评论(0)
推荐(0)
2016年11月21日
codeforces Round#380 div2
摘要: 1.字符串替换ogo+go…换成*** 思路:找ogo记录g位置,做初步替换和标记,非目标字母直接输出, 间隔为2的判断是否一个为标记g,一个为非标记做***替换 #include<iostream> using namespace std; bool mark[110] = { 0 }; int
阅读全文
posted @ 2016-11-21 18:08 demianzhang
阅读(192)
评论(0)
推荐(0)
2016年11月20日
poj 3468【线段树】
摘要: 题意:给定Q(1<=Q<=100000)个数A1,A2…AQ,以及可能多次进行的两个操作 1)对某个区间Ai……Aj的每个数都加n(n可变) 2)对某个区间Ai……Aj的数求和 分析: 树结点只存和,会导致每次加数时都要更新到叶子节点,速度太慢(O(nlog(n))),这是必须避免的 1.在增加时,
阅读全文
posted @ 2016-11-20 16:52 demianzhang
阅读(180)
评论(0)
推荐(0)
上一页
1
···
17
18
19
20
21
22
下一页
公告