自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ACM!荣耀之路!

【已退役】

  • 博客(997)
  • 资源 (15)
  • 收藏
  • 关注

原创 POJ2352:Stars(树状数组)

DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are

2015-06-21 16:44:38 2811 1

原创 POJ2299:Ultra-QuickSort(树状数组求逆序数)

DescriptionIn 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 seque

2015-06-21 11:06:21 1161

原创 LA2191:Potentiometers(树状数组)

题意:先给出一个数组,然后有两个操作S x y 把第x个数改成yM x y计算x~y个数的和思路:普通的树状数组,但不知道为什么会莫名其妙的一直WA#include #include #include #include #include #include #include #include #include #include #inclu

2015-06-18 22:49:12 1581 1

原创 Codeforces546D:Soldier and Number Game(求质因子个数)

Two soldiers are playing a game. At the beginning first of them chooses a positive integer n and gives it to the second soldier. Then the second one tries to make maximum possible number of rounds.

2015-06-18 16:11:46 2184

原创 Codeforces546C:Soldier and Cards

Two bored soldiers are playing card war. Their card deck consists of exactly n cards, numbered from 1 to n, all values are different. They divide cards between them in some manner, it's possible tha

2015-06-18 16:03:58 1584

原创 Codeforces546B:Soldier and Badges

Colonel has n badges. He wants to give one badge to every of his n soldiers. Each badge has a coolness factor, which shows how much it's owner reached. Coolness factor can be increased by one for the

2015-06-18 14:50:29 1777

原创 Codeforces546A:Soldier and Bananas

A soldier wants to buy w bananas in the shop. He has to pay k dollars for the first banana, 2k dollars for the second one and so on (in other words, he has to pay i·k dollars for the i-th banana).

2015-06-18 14:41:38 1342

原创 UVA11987:Almost Union-Find

题意:初始时,一共有n个元素的组合1,2,3....n给出三个操作1 p q:合并p,q所在的集合2 p q:把p移动到q所在的集合3 p:输出p所在的集合的元素的个数思路:比较巧妙的并查集,我们通过编号来标记节点,当一个元素移除的时候,我们可以通过对其目前父节点的sum与cnt进行更新,只要减掉就可以看做已经移除了而目前这个数值对应的值可以改成一个还没有使

2015-06-17 17:04:26 1366

原创 Codeforces551C:GukiZ hates Boxes(二分+贪心)

Professor GukiZ is concerned about making his way to school, because massive piles of boxes are blocking his way.In total there are n piles of boxes, arranged in a line, from left to right, i-th

2015-06-17 15:18:13 2665 1

原创 Codeforces551B:ZgukistringZ

Professor GukiZ doesn't accept string as they are. He likes to swap some letters in string to obtain a new one.GukiZ has strings a, b, and c. He wants to obtain string k by swapping some lette

2015-06-17 15:05:35 1768

原创 Codeforces551A:GukiZ and Contest

Professor GukiZ likes programming contests. He especially likes to rate his students on the contests he prepares. Now, he has decided to prepare a new contest.In total, n students will attend, and

2015-06-17 14:57:14 1240

原创 HDU3234&&UVA12232&&LA4487:Exclusive-OR(经典带权并查集)

Problem DescriptionYou are not given n non-negative integers X0, X1, ..., Xn-1 less than 220 , but they do exist, and their values never change.I'll gradually provide you some facts about them

2015-06-15 23:08:32 2437

原创 UVA11645:Bits

题意:求1~n的二进制中连续出现的两个1有多少个思路:首先枚举两个1的位置,如果此时枚举的位置与元素一样,则还要多加#include #include #include #include #include #include #include #include #include #include #include #include #inclu

2015-06-15 15:35:57 1004

原创 UVA11988:Broken Keyboard (a.k.a. Beiju Text)

You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problem withthe keyboard is that sometimes the “home” key or the “end” key gets automatically pressed (inter

2015-06-15 09:48:14 2295

原创 XTU1238:Segment Tree(线段树)

Segment TreeProblem Description:A contest is not integrity without problems about data structure.There is an array a[1],a[2],…,a[n]. And q questions of the following 4 types:1 l r c - Up

2015-06-14 18:27:45 1828

原创 XTU1233:Coins

CoinsProblem Description:Duoxida buys a bottle of MaiDong from a vending machine and the machine give her n coins back. She places them in a line randomly showing head face or tail face on. An

2015-06-14 18:23:03 1835

原创 XTU1242:Yada Number

Yada NumberProblem Description:Every positive integer can be expressed by multiplication of prime integers. Duoxida says an integer is a yada number if the total amount of 2,3,5,7,11,13 in its

2015-06-14 18:14:05 1554

原创 XTU1236:Fraction

FractionProblem Description:Everyone has silly periods, especially for RenShengGe. It's a sunny day, no one knows what happened to RenShengGe, RenShengGe says that he wants to change all decim

2015-06-14 17:40:01 1175

原创 UVA11992:Fast Matrix Operations(线段树)

题意:有一个初始状态全为0的矩阵,一共有三个操作1 x1 y1 x2 y2 v:子矩阵(x1,y1,x2,y2)所有元素增加v2 x1 y1 x2 y2 v:子矩阵(x1,y1,x2,y2)所有元素设为v3 x1 y1 x2 y2 v:查询子矩阵(x1,y1,x2,y2)的元素和,最大值和最小值思路:因为总元素葛素不超过10^6,而且更新是对于连续的行进行更新,

2015-06-14 10:58:10 1675

原创 LA3938:"Ray, Pass me the dishes!"(线段树)

DescriptionAfter doing Ray a great favor to collect sticks for Ray, Poor Neal becomes very hungry. In return for Neal's help, Ray makes a great dinner for Neal. When it is time for dinner, Ray

2015-06-13 23:52:10 2459

原创 UVA11235:Frequent values(RMQ)

You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1 ≤ i ≤ j ≤ n). For each query, d

2015-06-13 15:32:33 3498 1

原创 LA4329:Ping pong(树状数组)

DescriptionN(3N20000) ping pong players live along a west-east street(consider the street as a line segment). Each player has a unique skill rank. To improve their skill rank, they often com

2015-06-12 22:03:56 2046 1

原创 Codeforces548E:Mike and Foam

Mike is a bartender at Rico's bar. At Rico's, they put beer glasses in a special shelf. There are n kinds of beer at Rico's numbered from 1to n. i-th kind of beer has ai milliliters of foam on i

2015-06-12 17:45:35 1799

原创 Codeforces548D:Mike and Feet(单调栈)

Mike is the president of country What-The-Fatherland. There are n bears living in this country besides Mike. All of them are standing in a line and they are numbered from 1 to n from left to right

2015-06-12 17:32:31 1764

原创 Codeforces548C:Mike and Frog

Mike has a frog and a flower. His frog is named Xaniar and his flower is named Abol. Initially(at time 0), height of Xaniar is h1 and height of Abol is h2. Each second, Mike waters Abol and Xaniar

2015-06-12 17:10:33 1468

原创 Codeforces548B:Mike and Fun

Mike and some bears are playing a game just for fun. Mike is the judge. All bears except Mike are standing in an n × m grid, there's exactly one bear in each cell. We denote the bear standing in col

2015-06-12 17:00:23 1310

原创 Codeforces548A:Mike and Fax

While Mike was walking in the subway, all the stuff in his back-bag dropped on the ground. There were several fax messages among them. He concatenated these strings in some order and now he has string

2015-06-12 16:54:17 1397

原创 LA3027:Corporative Network(并查集)

A very big corporation is developing its corporative network. In the beginning each of the N enterprises of thecorporation, numerated from 1 to N, organized its own computing and telecommunication c

2015-06-10 22:03:40 1425

原创 LA3644:X-Plosives(并查集)

A secret service developed a new kind of explosive that attain its volatile property only when a speci cassociation of products occurs. Each product is a mix of two different simple compounds, to whi

2015-06-10 21:16:56 752

原创 UVA11997:K Smallest Sums(多路归并求最小k个和)

You’re given k arrays, each array has k integers. There are kk ways to pick exactly one element in eacharray and calculate the sum of the integers. Your task is to find the k smallest sums among t

2015-06-10 20:26:41 1525

原创 LA3135:Argus(优先队列)

A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data,Internet traffic, financial tickers, on-line auctions, and transaction logs such as Web usage l

2015-06-10 19:20:08 933

原创 UVA11991:Easy Problem from Rujia Liu?(STL构建变长二维数组)

11991 Easy Problem from Rujia Liu?Though Rujia Liu usually sets hard problems for contests (for example, regionalcontests like Xi’an 2006, Beijing 2007 and Wuhan 2009, or UVa OJ contests likeRuj

2015-06-10 17:04:51 710

原创 UVA11995:I Can Guess the Data Structure

There is a bag-like data structure, supporting two operations:1 x Throw an element x into the bag.2 Take out an element from the bag.Given a sequence of operations with return values, you’re goi

2015-06-10 16:41:38 606

原创 UVA11889:Benefit(已知LCM和其中一个数,求另一个数)

Recently Yaghoub is playing a new trick to sell some more. When somebody gives him A Tomans, hewho never has appropriate changes, asks for B Tomans such that lowest common multiple of A and Bequal

2015-06-10 15:13:07 1927

原创 UVA11388:GCD LCM(已知GCD和lLCM求a,b)

Description II U C   ONLINE   C ON TEST   2 008Problem D: GCD LCMInput: standard inputOutput: standard output The GCD of two positive inte

2015-06-10 14:19:41 2532

原创 后缀数组题目小结

因为有两次遇到了后缀数组的题目,于是这才下定决心学习了一下后缀数组,虽然对后缀数组并没有说理解得很透彻,但是一些基本得模板还是会用了,起码对付一些一般的后缀数组应该还是没有问题的了对于后缀数组的原理什么的我就不多说了,毕竟我理解的不算很透,只是说对于模板得出关键的三个数组还算有点使用的心得而已,具体的大家完全可以去看论文,百度可以找到很多,里面也说的很详细,大部分模板都是从那里面来的

2015-06-10 13:48:37 4974

原创 UVA1482:Playing With Stones(SG)

DescriptionYou and your friend are playing a game in which you and your friend take turns removing stones from piles. Initially there are N piles witha1, a2, a3,..., aN number of stones. On

2015-06-10 12:54:57 1102

原创 CSU1608: Particle Collider(后缀数组)

DescriptionIn the deep universe, there is a beautiful planet named as CS on which scientists have decided to build Immense Colossal Particle Collider (i.e. ICPC) to find the ultimate theory of t

2015-06-10 10:48:06 1093

原创 CSU1632: Repeated Substrings(后缀数组)

DescriptionString analysis often arises in applications from biology and chemistry, such as the study of DNA and protein molecules. One interesting problem is to find how many substrings are rep

2015-06-09 20:54:06 1075

原创 POJ3080:Blue Jeans(后缀数组)

DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth w

2015-06-09 19:54:35 1437

《数值分析》课后答案

《数值分析》课后答案

2015-07-02

离散数学第四版_课后答案

离散数学第四版_课后答案

2015-07-02

JSP毕业设计

完整的毕业设计,代码+文档

2015-06-29

动态规划32讲

动态规划32讲

2013-12-29

最全的C++函数库

C++函数库

2013-12-29

编译原理

编译原理

2013-12-29

《数据结构》课程设计公园导游图

《数据结构》课程设计公园导游图

2013-12-29

代码行统计工具

代码行统计工具

2013-06-08

《数据结构》 严蔚敏的全部代码实现(C语言)

《数据结构》 严蔚敏的全部代码实现

2013-06-08

ACM必做50题

ACM必做50题的解题

2013-06-08

C/C++函数大全

函数大全

2013-06-08

背包九讲(背包)

背包九讲

2013-06-08

叶核亚 java程序设计实用教程 第三版课后答案

Java程序设计实用教程(第3版) (叶核亚) 电子工业出版社 案例及素材

2013-03-09

计算机程序设计艺术

非常有用的专业书籍! 很有用!

2012-10-20

空空如也

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

TA关注的人

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