zhber
有好多做过的题没写下来,如果我还能记得就补吧

随笔分类 -  离散

Spoj-BGSHOOT
摘要:The problem is about Mr.BG who is a great hunter. Today he has gone to a dense forest for hunting and killing animals. Sadly, he has only one bullet i 阅读全文
posted @ 2017-07-15 12:26 zhber 阅读(156) 评论(0) 推荐(0)
bzoj1537 [POI2005]Aut- The Bus
摘要:DescriptionByte City 的街道形成了一个标准的棋盘网络 – 他们要么是北南走向要么就是西东走向. 北南走向的路口从 1 到 n编号, 西东走向的路从1 到 m编号. 每个路口用两个数(i, j) 表示(1 #include#include#include#include#inclu... 阅读全文
posted @ 2014-12-03 21:10 zhber 阅读(436) 评论(0) 推荐(0)
bzoj1935 [Shoi2007]Tree 园丁的烦恼
摘要:Description很久很久以前,在遥远的大陆上有一个美丽的国家。统治着这个美丽国家的国王是一个园艺爱好者,在他的皇家花园里种植着各种奇花异草。有一天国王漫步在花园里,若有所思,他问一个园丁道: “最近我在思索一个问题,如果我们把花坛摆成六个六角形,那么……” “那么本质上它是一个深度优先搜索,陛... 阅读全文
posted @ 2014-12-03 08:43 zhber 阅读(275) 评论(0) 推荐(0)
bzoj3626 [LNOI2014]LCA
摘要:Description给出一个n个节点的有根树(编号为0到n-1,根节点为0)。一个点的深度定义为这个节点到根的距离+1。设dep[i]表示点i的深度,LCA(i,j)表示i与j的最近公共祖先。有q次询问,每次询问给出l r z,求sigma_{l#include#include#include#i... 阅读全文
posted @ 2014-11-28 16:34 zhber 阅读(352) 评论(0) 推荐(0)
2014.8.15模拟赛【公主的工作】&&bzoj1046[HAOI2007]上升序列
摘要:bzoj题目是这样的Description对于一个给定的S={a1,a2,a3,…,an},若有P={ax1,ax2,ax3,…,axm},满足(x1 =当前的x,那么a[i]可以取,然后last=a[i],x--,一直这样做下去#includeinline int read(){ int x... 阅读全文
posted @ 2014-08-15 23:13 zhber 阅读(181) 评论(0) 推荐(0)
bzoj1645 [Usaco2007 Open]City Horizon 城市地平线
摘要:DescriptionFarmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouet... 阅读全文
posted @ 2014-07-30 22:54 zhber 阅读(229) 评论(0) 推荐(0)