自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 收藏
  • 关注

原创 NBUT - 1220 SPY (STL map)

SPYThe National Intelligence Council of X Nation receives a piece of credible information that Nation Y will send spies to steal Nation X’sconfidential paper. So the commander ofThe National Int...

2019-03-29 20:26:28 231

原创 POJ - 2299 Ultra-QuickSort (归并排序)

Ultra-QuickSortIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seq...

2019-03-29 19:02:13 226

原创 CodeForces - 731C Socks (并查集)

SocksArseniy is already grown-up and independent. His mother decided to leave him alone formdays and left on a vacation. She have prepared a lot of food, left some money and washed all Arseniy'...

2019-03-29 16:23:07 278

原创 NBUT - 1223 Friends number (暴力打表)

Friends numberPaula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then, everything is changing… (The story in “...

2019-03-29 00:06:20 200

原创 POJ - 3122 Pie(二分)

PieMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and eac...

2019-03-28 22:51:50 234

原创 水陆距离 HihoCoder - 1478 (BFS)

水陆距离给定一个N x M的01矩阵,其中1表示陆地,0表示水域。对于每一个位置,求出它距离最近的水域的距离是多少。 矩阵中每个位置与它上下左右相邻的格子距离为1。Input第一行包含两个整数,N和M。以下N行每行M个0或者1,代表地图。数据保证至少有1块水域。对于30%的数据,1 <= N, M <= 100 对于100%的数据,1 <= ...

2019-03-28 22:34:32 618

原创 SCU - 4490 Lisp em

Lisp emTime Limit: 1000 MS Memory Limit: 131072 K DescriptionThere are two lists and they may be intersected with each other. You must judge if they are intersected and find the first...

2019-03-28 22:24:28 270

原创 POJ - 3026 Borg Maze (BFS + 最小生成树)

Borg MazeThe Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciousness of the Borg civi...

2019-03-28 15:24:15 109

原创 HDU - 1584 蜘蛛牌 (深搜)

蜘蛛牌蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从A到10,且随机的在一行上展开,编号从1到10,把第i号上的牌移到第j号牌上,移动距离为abs(i-j),现在你...

2019-03-27 20:51:27 120

原创 HDU - 1110 Equipment Box (数学)

Equipment BoxThere is a large room in the Pyramid called Room-of-No-Return. Its floor is covered by rectangular tiles of equal size. The name of the room was chosen because of the very high number o...

2019-03-27 20:15:56 173

原创 HDU - 1535 Invitation Cards (反向建边+Dijkstra | spfa)

题目链接:https://vjudge.net/problem/HDU-1535Invitation CardsIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want t...

2019-03-27 19:09:41 282

原创 HDU - 4722 Good Numbers(数位dp)

Good NumbersIf we sum up every digit of a number and the result can be exactly divided by 10, we say this number is a good number.You are required to count the number of good numbers in the range ...

2019-03-27 14:09:22 170

原创 HDU - 1250 ​​​​​​​ Hat's Fibonacci (大数+滚动数组)

Hat's FibonacciA Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1.F(1) = 1, F(2) = 1, F(3) = 1,F(4) = 1, F(n>4) = F(n - ...

2019-03-26 23:29:32 148

原创 POJ - 2387 Til the Cows Come Home (Dijkstra模板题)

Til the Cows Come HomeBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty s...

2019-03-25 19:26:48 106

原创 FZU - 2209 老S的旅行计划 (dijkstra)

老S的旅行计划老S在某城市生活的非常不自在,想趁着ICPC举办期间在省内转转。已知老S所在的省有N个城市,M条无向边(对于某一对结点可能出现重边)。由于省内的交通相当糟糕,通过某条边所需要花费的时间受到一天中不同时刻的影响。此外对于某一时刻(一天24小时的任意一个整点算一个时刻),从任何方向通过无向边所需要的时间相同。现在老S想请你帮他规划一下旅行路线。Input第一行输入...

2019-03-25 13:41:03 326

原创 HDU - 1754 I Hate It (分块)

I Hate It很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=2000...

2019-03-23 10:53:10 98

原创 HDU-6470 Count(矩阵快速幂)

CountTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 435Accepted Submission(s): 177Problem DescriptionFarmer John有n头奶牛.某天奶牛想要数一数有多...

2019-03-18 18:45:15 253

原创 快速幂模板

模板1:int power(int a,int b,int c){ int ans=1; a=a%c; while(b) { if(b%2==1) ans=ans*a%c; a=a*a%c; b/2; } return ans;}模板2:#define ll...

2019-03-18 16:43:59 72

原创 HDU - 1205 吃糖果

吃糖果HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0&lt;N&lt;=1000...

2019-03-11 20:03:23 135

原创 牛客练习赛41 球的体积并

链接:https://ac.nowcoder.com/acm/contest/373/E来源:牛客网题目描述某天lililalala正在玩一种奇妙的吃鸡游戏--因为在这个游戏里会同时有两个圆形安全区(他们可能相交)。lililalala觉得求圆的面积并太简单了,所以想把这个问题升级一下。现在在三维空间里有 2 个球形安全区,分别用四元组 &lt;x1,y1,z1,r1&gt...

2019-03-09 11:11:53 182

原创 牛客练习赛41 抓捕盗窃犯 (并查集)

链接:https://ac.nowcoder.com/acm/contest/373/C来源:牛客网题目描述Q市发生了一起特大盗窃案。这起盗窃案是由多名盗窃犯联合实施的,你要做的就是尽可能多的抓捕盗窃犯。已知盗窃犯分布于NN个地点,以及第ii个地点初始有aiai名盗窃犯。特别的是,对于每一个地点uu,都有一个固定的地点vv--当前如果某个盗窃犯位于地点uu...

2019-03-09 11:09:11 215

原创 牛客练习赛41 666RPG

链接:https://ac.nowcoder.com/acm/contest/373/B来源:牛客网题目描述在欧美,“666”是个令人极其厌恶和忌讳的数,被称为“野兽数”。相传,尼禄,这位历史上以暴君著称的古罗马皇帝,在一次罗马大火后,无端指控是基督徒焚烧了罗马,并对他们进行大肆镇压。尼禄死后,部分基督徒出于对尼禄的恐惧,相信他并没有死去,而且还会回到罗马来。圣经《新约·启示录》中...

2019-03-09 11:05:10 210

原创 POJ - 2349 Arctic Network (最小生成树 Kruskal)

Arctic NetworkThe Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing t...

2019-03-01 16:52:42 168

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除