- 博客(18)
- 资源 (6)
- 收藏
- 关注
原创 ural 1136. Parliament -搜索二叉树
1136. ParliamentA new parliament is elected in the state of MMMM. Each member of the parliament gets his unique positive integer identification number during the parliament registration. The numbers were given in a random order; gaps in the sequence of num
2016-11-30 21:18:51 419
原创 ural 1106. Two Teams -bfs
1106. Two TeamsThe group of people consists of N members. Every member has one or more friends in the group. You are to write program that divides this group into two teams. Every member of each team must have friends in another team.
2016-11-27 15:57:48 395
原创 ural 2025. Line Fighting -思维题
2025. Line FightingBoxing, karate, sambo… The audience is sick of classic combat sports. That is why a popular sports channel launches a new competition format based on the traditional Russian entertainment called line fighting. There can be from 2 to k t
2016-11-27 13:21:14 797
原创 ural 1982. Electrification Plan -最小生成树
1982. Electrification PlanSome country has n cities. The government has decided to electrify all these cities. At first, power stations in k different cities were built. The other cities should be connected with the power stations via power lines. For any
2016-11-26 18:29:46 396
原创 ural 1009. K-based Numbers - dp
1009. K-based NumbersLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’t contain two successive zeros. For example: 1010230 is a valid 7-digit number; 1000198 is not a valid number;
2016-11-24 23:57:10 463
原创 ural 1820. Ural Steaks -思维题
1820. Ural SteaksAfter the personal contest, happy but hungry programmers dropped into the restaurant “Ural Steaks” and ordered n specialty steaks. Each steak is cooked by frying each of its sides on a frying pan for one minute.Unfortunately, the chef has
2016-11-23 21:19:26 588
原创 ural 1100. Final Standings -排序
1100. Final StandingsOld contest software uses bubble sort for generating final standings. But now, there are too many teams and that software works too slow. You are asked to write a program, which generates exactly the same final standings as old softwa
2016-11-23 20:55:44 421
原创 ural 1110 Power
1110. PowerYou are given the whole numbers N, M and Y. Write a program that will find all whole numbers X in the interval [0, M − 1] such that XN mod M = Y.
2016-11-23 20:30:33 279
原创 ural 1005. Stone Pile -01背包-dp
1005. Stone PileYou have a number of stones with known weights w1, …, wn. Write a program that will rearrange the stones into two piles such that weight difference between the piles is minimal.Input contains the number of stones n (1 ≤ n ≤ 20) and weights
2016-11-23 19:54:27 641
原创 ural 1671 Anansi's Cobweb-并查集
ural 1671 Anansi's Cobweb-并查集The first line contains integers N and M — the number of nodes and threads in the cobweb, respectively (2 ≤ N ≤ 100000; 1 ≤ M ≤ 100000) . Each of the next M lines contains two different integers — the 1-based indices of nodes
2016-11-22 00:07:39 576
原创 Codeforces Round #380 B Spotlights -dp
Codeforces Round #380 B Spotlights -dpTheater stage is a rectangular field of size n × m. The director gave you the stage's plan which actors will follow. For each cell it is stated in the plan if there would be an actor in this cell or not.You are to
2016-11-20 23:46:55 418
原创 CodeForces 416 Guess a number!
A TV show called "Guess a number!" is gathering popularity. The whole Berland, the old and the young, are watching the show.The rules are simple. The host thinks of an integer y and the participants guess it by asking questions to the host. There are four
2016-11-20 14:17:52 408
原创 CodeForces 586D Phillip and Trains -dfs
Phillip and TrainsThe mobile application store has a new game called "Subway Roller".The protagonist of the game Philip is located in one end of the tunnel and wants to get out of the other one. The tunnel is a rectangular field consisting of three rows
2016-11-20 14:12:00 387
原创 poj2431 Expedition 贪心+优先队列
ExpeditionDescriptionA group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor drivers, the cows unfortunately managed to run over a rock and puncture the truck's fuel tank. The truck now leaks one unit of fuel
2016-11-16 19:59:59 342
原创 【原+转】STL之优先队列的cmp函数和sort以及qsort函数的cmp
sort以及qsort函数的cmp 转自 http://blog.csdn.net/lionel_d/article/details/41746135 写的很好,直接复制粘贴过来了,感谢一、sort 以及 qsort首先,我们来谈谈大名鼎鼎的void qsort(void *base,int nelem,int width,int (*fcmp)(const void *,const void *...
2016-11-14 22:39:07 5514
原创 poj2823 Sliding Window 单调队列
Sliding WindowDescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of sizek which is moving from the very left of the array to the very right. You can only see thek n
2016-11-14 22:28:43 345
原创 poj 2828 Buy Tickets -插队问题-单节点更新-线段树
Buy TicketsRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little Cat still had schedules going here and there. Now, he had to t
2016-11-11 19:07:09 592
DOS 7.10 IOS镜像
2017-09-14
编译原理(清华大学出版社)课后题详解 第二版
2017-09-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人