自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(85)
  • 资源 (1)
  • 收藏
  • 关注

原创 一个有意思的博弈

题目描述有两个人玩游戏,轮流取物品。每个物品对不同的人都会存在不同的价值。对手使用的贪心原则,也就是说在每一步对手都会选择对他价格最大的物品。当存在多个物品价格相同的时候,对手会随机选择一个物品。这个时候问我们可以最多得到多大的结果。解题过程咋一看,这是个明显贪心过程,我们按照两个关键字排序之后对两个人都采用贪心策略模拟就可以了。但是,事实上,这样做是不对的。因为A要取的物品也可能是对B很重要的物品

2016-12-10 21:32:39 553

原创 [CF383]一个迟来的检讨

这场比赛是亚洲区比赛回来之后打得比较正经的一次个人赛,同时也暴露出了我最近精力及其的不集中,做事情非常的没有条理。非常的没有耐心,需要冷静下来。

2016-12-09 15:28:20 617

原创 [hdu5985]概率题的推导

题目描述Bob has collected a lot of coins in different kinds. He wants to know which kind of coins is lucky. He finds out a lucky kind of coins by the following way. He tosses all the coins simultaneously,

2016-11-30 23:04:09 1740 1

原创 hihocoder1104(Dfs预处理+树形DP)

题目描述Little Hi is taking an adventure in Suzhou now. There are N beautiful villages in Suzhou which are numbered from 1 to N. They connected by N-1 roads in such a way that there is excactly one way to

2016-11-26 11:07:49 399

原创 [hdu4940]Tourism Planning 状态压缩DP

题目描述Several friends are planning to take tourism during the next holiday. They have selected some places to visit. They have decided which place to start their tourism and in which order to visit these

2016-11-21 23:23:34 373

原创 [Qingdao Regional]最好的周末

这两天,我经历了我所见过的最大的场面,似乎我的世界也突然扩大了很多倍。从我来到大学开始,我就一直十分犹豫到底要做些什么。因为这个学校似乎有太多所谓的牛人,他们组成了我在这个小世界里的”世界观”。似乎所有的评判标准都是由他们而定的。有的时候,我会感觉到非常的痛苦,深感到自己离所谓的”优秀”太远。似乎,这个周末之后,我之前所有的问题都得到了回答。比赛的过程其实十分简单,因为我们队的实力太弱,还有很长的路

2016-11-14 23:41:05 450

原创 [hihocoder1063]树形DP

题目描述假设当前作战区域是一棵有根树,编织者所在的位置为根节点1,树中每个节点,有一个权值vi,代表这个节点的收益。树中的每条边,有一个权值wi,代表每条边的长度。编织者从根结点出发,最远累计移动d 距离时,所能得到的收益的最大值是多少?注意重复经过一个节点收益只能计算一次。算法思路我们很显然可以得到一种算法思路是:dp[i][j],表示从第i个结点走j个单位的路程可以得到的最大收益。

2016-11-10 23:36:10 309

原创 hihocoder1136-DAG和DP的关系

Professor Q develops a new software. The software consists of N modules which are numbered from 1 to N. The i-th module will be started up by signal Si.

2016-11-10 09:29:19 287

原创 codeforces733E LCA在线

题目链接如下:http://codeforces.com/problemset/problem/733/F算法思路这道题让我又加深了一下对于倍增二分求LCA的原理. 很显然,要让每两个城市之间两两可达,需要构造一棵最小生成树。但是我们在这里可以使用一定的钱减少一些边的dissatisfation,而且这个值可以为负值,很显然我们要选择的就是成本最小的那一条边.这样的话,我们先使用最小生成树算法构造

2016-11-06 23:26:56 924

原创 [随便切水题系列]hihoCoder太阁算法竞赛12

今天晚上感觉情绪莫名的低落,openGL渲染一个小图搞了半天没搞好,还有一大堆的作业实验报告,还有比赛和考试要准备,感觉很烦,所以上hihocoder上敲了一点水题,让心情放松下来。一直不能掌控自己的情绪,总是容易被各种环境因素带节奏。根本原因还是自己弱的不行啊。 题目链接:https://hihocoder.com/contest/hihointerview21/problemsA题给出4个数,

2016-10-27 21:54:49 389

原创 hdu5514容斥原理和群论

题目描述There are m stones lying on a circle, and n frogs are jumping over them. The stones are numbered from 0 to m−1 and the frogs are numbered from 1 to n. The i-th frog can jump over exactly ai stones

2016-10-07 23:16:38 680

原创 [hdu5521]最短路优化

Bessie and her friend Elsie decide to have a meeting. However, after Farmer John decorated his fences they were separated into different blocks. John’s farm are divided into n blocks labelled from

2016-10-07 16:22:31 282

原创 [C#]一点面对对象编程

全部都是类在C#中,所有的代码都会包含在一个类当中,而程序的执行入口会在一个唯一的main方法当中。而类中的方法也会存在着不同,比如public,private等。 为了保护数据,一般来说我们不将一个类中的元素设置为public,以防被随意的更改,但是如果设置为private的话,程序的执行又会存在诸多不便。所以,C#提供一种方便的功能,属性,我们将一个属性赋予一个变量,就可以通过这个属性来存取这

2016-10-05 21:28:17 441

原创 [CodeForce375]E图论

题目描述There are n cities and m two-way roads in Berland, each road connects two cities. It is known that there is no more than one road connecting each pair of cities, and there is no road which connects

2016-10-05 16:16:36 418

原创 [C#]一些基础知识

C#中的类型c#中的类型大部分和C语言中的类型一样,不过有下面几个是不同的 long: 64位的整形 ulong: 64位的不带符号的整数 decimal: 高精度的浮点数 DateTime: 表示系统的时间,存在8个字节 string: 是的,字符串也是一个变量命名规则(identifier)在一个c#程序中,可能存

2016-10-03 15:04:40 279

原创 [hihocoder1392]ACM/ICPC Beijing

Rainbow loves to play kinds of War Chess games. There are many famous War Chess games such as “Biography of Cao Cao”, “Anecdotes of Wagang Mountain”, etc. In this problem, let’s consider a much simpl

2016-09-28 23:31:12 323

原创 数据库的关系运算

数据库本质上就是一些数据的集合,所以对一个数据库的操作就是十分类似于对一些集合的操作。这篇博客对我们会遇到的数据库的关系作一个小小的总结。传统的集合运算在这里,共有并,差,交和笛卡尔积四种运算。

2016-09-27 23:02:19 4024 2

原创 [hdu5898]ACM/ICPC Reginal Shengyang

For a number,if the length of continuous odd digits is even and the length of continuous even digits is odd,we call it odd-even number.Now we want to know the amount of odd-even number.

2016-09-18 21:57:05 789 4

原创 [hdu5869]离线思想统计区间元素数量

This is a simple problem. The teacher gives Bob a list of problems about GCD (Greatest Common Divisor). After studying some of them, Bob thinks that GCD is so interesting.

2016-09-16 15:46:18 661

原创 字符串的最小表示法[hdu5442]

题目描述Lulu has a sweet tooth. Her favorite food is ring donut. Everyday she buys a ring donut from the same bakery. A ring donut is consists of n parts.

2016-09-12 23:38:09 520

原创 poj2455二分构图网络流

Farmer John is constructing a new milking machine and wishes to keep it secret as long as possible.

2016-08-31 21:11:03 539

原创 [poj1639]度限制生成树

Problem DescriptionThe Contortion Brothers are a famous set of circus clowns, known worldwide for their incredible ability to cram an unlimited number of themselves into even the smallest vehicle.

2016-08-28 23:14:51 700

原创 2016年暑假总结

这么快,大二的暑假就结束了,我也是一个大三的学生了。感觉什么都不会,两年就过去了。想要在这里总结一下过去的生活。

2016-08-28 20:48:24 445

原创 [2-sat]构造一个可行解(poj3648)

2-sat问题的可行解当我们确定了存在一个可行解的时候,下面的工作往往是要构造一个可行解,那么,如何来构造这样的解呢? 我们知道,当我们选择了一个强连通分量中的一个点的时候,所有的点都会被选择,所以,此时,我们将强连通分量缩点,这样就构造出了一个有向无环图。对这个图进行反向的拓扑排序,然后进行染色就行了。

2016-08-23 21:08:08 601

原创 [2-sat]动态的2-sat问题(hdu3622)

概述在一些最优化的问题当中,我们不知道一些指标的最优值是多少,而这个指标又在影响我们的逻辑表达式,我觉得这样的问题是一种动态的2-sat问题。通常,我们使用搜索,不断的重复建图,最后达到解题的目标.

2016-08-23 20:57:11 382

原创 [2-sat]模型基础(poj3678)

2-sat入门sat问题是计算机科学的历史上一个非常著名的NPC问题。指的是,任何一个逻辑表达式都可以化简成为一个析取范式,而证明这个逻辑表达式是否可解。

2016-08-23 20:45:57 719

原创 [poj3687]拓扑排序的应用

Windy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that:No two balls share the same label.

2016-08-20 11:54:21 365

原创 [poj1161]平面图缩点

In a country, great walls have been built in such a way that every great wall connects exactly two towns. The great walls do not cross each other.

2016-08-18 20:05:32 317

原创 [hdu5492]背包问题的扩展

Frog fell into a maze. This maze is a rectangle containing N rows and M columns. Each grid in this maze contains a number, which is called the magic value. Frog now stays at grid (1, 1)

2016-08-17 16:29:33 338

原创 hdu5000一道很有意思的DP

After eating food from Chernobyl, DRD got a super power: he could clone himself right now! He used this power for several times. He found out that this power was not as perfect as he wanted.

2016-08-15 21:49:47 592

原创 hdu5045状态压缩DP

In the ACM International Collegiate Programming Contest, each team consist of three students. And the teams are given 5 hours to solve between 8 and 12 programming problems.

2016-08-14 19:34:54 260

原创 poj1466最大二分图匹配

In the second year of the university somebody started a study on the romantic relations between the students. The relation “romantically involved” is defined between one girl and one boy.

2016-08-13 16:18:51 318

原创 hdu3345[BFS和SPFA]

War chess is hh’s favorite game: In this game, there is an N * M battle map, and every player has his own Moving Val (MV). In each round, every player can move in four directions as long as he has

2016-08-11 16:10:30 296

原创 hdu2717[BFS+启发式搜索]

Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K。

2016-08-09 13:35:55 754

原创 POJ2151正难则反

Organizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect the contest result satisfy the following two terms:

2016-08-09 13:22:24 301

原创 POJ3920状态压缩和组合数学

Acmers have been the Earth Protector against the evil enemy for a long time, now it’s your turn to protect our home.

2016-08-07 16:48:21 311

原创 hdu4901-DP注意精度

There is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things. Although the king used to be wise and beloved by his people.

2016-08-06 14:57:09 246

原创 hdu2577一道很不错的DP

Pirates have finished developing the typing software. He called Cathy to test his typing software. She is good at thinking. After testing for several days, she finds that if she types a string by s

2016-08-05 10:07:05 302

原创 hdu4722数位DP

If 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 from A to B

2016-08-05 09:56:49 412

原创 POJ1505 贪心+二分优化

一个二分搜索的题目

2016-08-04 23:49:55 759

计算数论.pdf

这本书描述了和计算机学科有关的数论知识.对进行密码学等信息安全方面工作的人具有很大的益处

2015-07-27

空空如也

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

TA关注的人

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