自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

并非所有流浪者都迷失了自我

blog.youkuaiyun.com/xp731574722

  • 博客(51)
  • 资源 (2)
  • 收藏
  • 关注

原创 CodeForces 616C:The Labyrinth(BFS)

You are given a rectangular field of n × m cells. Each cell is either empty or impassable (contains an obstacle). Empty cells are marked with '.', impassable cells are marked with '*'. Let's call two empty cell

2017-07-31 20:46:03 699

原创 CSU 1224: ACM小组的古怪象棋(BFS)

ACM小组的Samsara和Staginner对中国象棋特别感兴趣,尤其对马(可能是因为这个棋子的走法比较多吧)的使用进行深入研究。今天他们又在 构思一个古怪的棋局:假如Samsara只有一个马了,而Staginner又只剩下一个将,两个棋子都在棋盘的一边,马不能出这一半棋盘的范围,另外这 一半棋盘的大小很奇特(n行m列)。Samsara想知道他的马最少需要跳几次才能吃掉Staginner的将(我们假定其不会移动)。

2017-07-31 20:44:25 448

原创 HDU 1242:Rescue(BFS+优先队列)

Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.

2017-07-31 20:38:57 377

原创 HDU 1241:Oil Deposits(BFS)

The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the land int

2017-07-31 20:14:39 292

原创 POJ 1915:Knight Moves(BFS)

Background Mr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him? The Problem Your task is to write a program

2017-07-31 17:48:18 1300

原创 HDU 1312:Red and Black(BFS)

There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on

2017-07-31 17:41:15 472

原创 B - UmBasketella (三分)

Twenty-four pointTime limit:1000 ms Memory limit:65536 kB OS:Linux Problem DescriptionIn recent days, people always design new things with multifunction. For instance, you can not only use cell phone

2017-07-30 20:40:24 348

转载 Markdown中数学公式整理

分数,平方下标省略号行间公式开根号矢量积分极限累加累乘希腊字母三角函数对数函数关系运算符点击查看原文地址 作者:Zhakel 简要介绍 因为要使用markdown编辑数学公式然后在文档、网页中使用,但是自己总是记不住这么多东西,特别是几天不用,很多都忘记了,因此准备就数学公式的Latex编辑方式做一个整理,以方便自己和读...

2017-07-30 14:01:17 4719

原创 CSU 1974:神奇药水(水?)

对于csuxushu来说,能够在CSU(California State University)组织2017年的ACM暑期集训让他感到十分荣幸。 csuxushu是一名充满梦想的程序员,因此他也希望来参加暑期集训的ACM萌新们和他一样怀揣着书写CSU-ACM历史的梦

2017-07-29 20:58:13 1284

原创 CSU 1973:给自己出题的小X(DFS或DP)

小X学习了dfs,为了练习搜索,开始给自己出题玩。 玩着玩着,一会把自己难住了,一会又被自己难倒了,真是有趣诶! 小X出的题: 现在有N个不同的正整数,求它们可以组成多少个这样的集合,满足:集合内的元素数量S>1集合内任意两个数的差的绝对值都大于集合内的元

2017-07-29 20:38:34 550

原创 CSU 1972:大梵天的恩赐(递推)

许久没有抽到SSR的子浩君,祈求上天赐给他一个SSR,他的诚信感动了大梵天,于是,大梵天又弄了一个2*n层的汉诺塔,一共有n种大小,每种大小两个,从上往下按照从小到大依次放置,如果子浩君能够按照汉诺塔的规则摆放好,那么就赐予子浩君一个SSR。 然而当子浩君摆好的时候,

2017-07-29 20:20:48 424

原创 CSU 1970:LXX数(数学?)

又是一年集训时,刚出家里赶来的LXX很是郁闷。因为CS市的天气实在是难以忍受了,加之搬寝室到CS大学“老”校区。一天晚上CS大学“老”校区的寝室又停电了,LXX和室友实在是难以呆下去了。于是商量一起去网吧吹空调,但是谁请客是个问题。LXX的室友小Z便甩出一个问题

2017-07-29 19:44:19 911

原创 CSU 1971:安排座位(贪心)

一年一度的暑期集训又开始了! 作为老人的小明非常忧伤,因为他要给所有的新人安排座位。由于安排给新人的座位上的机器可能有各种毛病(比如很卡,上不了网之类的),这些问题的出现都会让新人的训练热情下降。为了让更多的新人能够留下,小明自然希望大家的热情都是高涨的。

2017-07-29 17:24:25 556

原创 CSU - 1600:Twenty-four point(DFS)

Given four numbers, can you get twenty-four through the addition, subtraction, multiplication, and division? Each number can be used only once.

2017-07-28 20:38:36 342

原创 CSU 1960:单源最大权路径 (DFS)

有一棵由N个结点构成的树,每一条边上都有其对应的权值。现在给定起点,求从该点出发的一条路径(至少有一条边)使得这条路径上的权值之和最大,并输出这个最大值。

2017-07-28 16:48:47 461

原创 HihoCoder - 1049:后序遍历(递归)

后序遍历 Time limit:10000 ms Memory limit:262144 kB OS:Linux Problem Description在参与过了美食节之后,小Hi和小Ho在别的地方又玩耍了一阵子,在这个过程中,小Ho得到了一个非常有意思的玩具——一棵由小球和木棍连接起来的二叉树!小Ho对这棵二叉树爱不释手,于是给它的每一个节点都标记了一个标号——一个属于A..Z的大写字母,并且没

2017-07-28 16:40:50 391

原创 HDU - 2553:N皇后问题(经典DFS)

在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。

2017-07-28 16:35:53 659

原创 UVA 1608:Non-boring sequences(递归+分治思想)

We were afraid of making this problem statement too boring, so we decided to keep it short. A sequence is called non-boring if its every connected subsequence contains a unique element, i.e. an element such

2017-07-28 08:26:38 1155

原创 UVA 12627:Erratic Expansion(递归)

As you can see, a red balloon in the cell (i, j) (that is i-th row and j-th column) will multiply toproduce 3 red balloons in the cells (i ∗ 2 − 1, j ∗ 2 − 1), (i ∗ 2 − 1, j ∗ 2), (i ∗ 2, j ∗ 2 − 1) and a blu

2017-07-27 20:50:20 419

原创 HDU - 2045:不容易系列之(3)—— LELE的RPG难题(递推)

人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即"可乐"),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名的RPG难题:

2017-07-27 20:14:59 662

原创 CodeForces 527C:Glass Carving (set与multiset应用)

Leonid wants to become a glass carver (the person who creates beautiful artworks by cutting the glass). He already has a rectangular w mm  ×  h mm sheet of glass, a diamond glass cutter and lots of enthusiasm.

2017-07-26 23:15:56 633

原创 CodeForces 589F:Gourmet and Banquet(二分+贪心)

A gourmet came into the banquet hall, where the cooks suggested n dishes for guests. The gourmet knows the schedule: when each of the dishes will be served.For i-th of the dishes he knows two integer moment

2017-07-26 22:52:00 395

原创 POJ 3111:K Best(思维+二分)

Demy has n jewels. Each of her jewels has some value vi and weight wi.Since her husband John got broke after recent financial crises, Demy has decided to sell some jewels. She has decided that she would kee

2017-07-26 20:34:11 372

原创 UVA 11995:I Can Guess the Data Structure!(水)

Given a sequence of operations with return values, you’re going to guess the data structure. It isa stack (Last-In, First-Out), a queue (First-In, First-Out), a priority-queue (Always take out largerelement

2017-07-26 17:56:17 559

原创 总结——STL 常用数据结构及用法

STL中常用数据结构及用法 C++中的STL(Standard Template Library),即标准模板库,中包含了很多编程时常用的数据结构,省去了自己临时写的麻烦,这里就来总结一下。如果有错误或写的不好的地方还请多指正。首先稍微介绍下iterator(迭代器),iterator不是数据结构,所有容器都提供获得迭代器的元素,声明时,其数据类型必须与容器的数据类型一致。其作用主要是用来遍历

2017-07-26 08:57:27 8610 1

原创 G - River Hopscotch(二分)

Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight river with a rock at the

2017-07-25 22:57:20 405

原创 E - Aggressive cows(二分)

Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).His C (2 <= C <= N) cows don't like t

2017-07-25 22:27:22 536

原创 C - 4 Values whose Sum is 0(基础二分)

The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . In the following, we assu

2017-07-25 22:11:51 467

原创 D - Monthly Expense (二分)

Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤ moneyi ≤ 10,000) that he will nee

2017-07-25 21:01:04 403

原创 F - Drying(思维+二分)

It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But the radiat

2017-07-25 20:34:38 704

原创 B - Can you solve this equation?(简单二分)

Now,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100; Now please try your lucky.

2017-07-25 17:39:24 561

原创 A - Can you find it?(简单二分)

Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X.

2017-07-25 17:30:07 607

原创 HDU 4841:圆桌问题(vector应用)

圆桌上围坐着2n个人。其中n个人是好人,另外n个人是坏人。如果从第一个人开始数数,数到第m个人,则立即处死该人;然后从被处死的人之后开始数数,再将数到的第m个人处死……依此方法不断处死围坐在圆桌上的人。试问预先应如何安排这些好人与坏人的座位,能使得在处死n个人之后,圆桌上围坐的剩余的n个人全是好人。

2017-07-24 21:55:51 1109

原创 HDU 1022:Train Problem I(堆栈的基本应用)

As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^

2017-07-24 21:47:08 597

原创 HDU 1896:Stones(优先队列)

Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a little tired, so Sempr always play some games this time. There are ma

2017-07-24 21:00:58 522

原创 CSU 1826:Languages(stringstream的应用)

The Enterprise has encountered a planet that at one point had been inhabited. The only remnant from the prior civilization is a set of texts that was found. Using a small set of keywords found in various differ

2017-07-24 20:43:42 322

原创 CodeForces 831C : Jury Marks(set的使用)

Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain number of points (may be negative, i. e. points were subtracted). Initially the participant had some score, a

2017-07-24 20:29:27 505

原创 POJ 3096: Surprising Strings (水)

The D-pairs of a string of letters are the ordered pairs of letters that are distance D from each other. A string is D-unique if all of its D-pairs are different. A string is surprising if it is D-unique for ev

2017-07-24 20:04:04 266

原创 HDU 1861:游船出租(模拟)

游船出租Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) (Java/Others)Problem Description现有公园游船租赁处请你编写一个租船管理系统。当游客租船时,管理员输入船号并按下S键,系统开始计时;当游客还船时,管理员输入船号并按下E键,系统结束计时。船号为

2017-07-18 13:59:07 854

转载 总结——背包问题解析及模板代码

作者:kangroger 原文地址:01背包问题和完全背包问题背包问题解析及模板代码01背包问题:01背包问题:一个背包总容量为V,现在有N个物品,第i个 物品体积为weight[i],价值为value[i],现在往背包里面装东西,怎么装能使背包的内物品价值最大? 看到这个问题,可能会想到贪心算法,但是贪心其实是不对的。例如最少硬币找零问题,要用动态规划。动态规划思想就是解决子问题并记录子问题

2017-07-10 21:53:54 672

newlib.tar.gz

newlib.tar.gz

2021-12-14

Socket入门教程及源码

详细介绍参见:https://blog.youkuaiyun.com/xp731574722/article/details/81049410

2018-07-15

空空如也

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

TA关注的人

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