T - Buy Tickets(线段树)

Railway 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 approa...

2017-09-30 15:17:38

阅读数:144

评论数:0

I - Tunnel Warfare(线段树,区间合并)

During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, vi...

2017-09-30 09:18:06

阅读数:192

评论数:0

I - Harmonic Number (欧拉常数,调和级数,打表)

In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers:In this problem, you are given n, you have to fi...

2017-09-28 21:50:41

阅读数:293

评论数:0

H - Can you answer these queries?(线段树)

A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. E...

2017-09-28 20:57:49

阅读数:273

评论数:0

Balanced Lineup(线段树+最大值,最小值)

Balanced Lineup Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 56970 Accepted: 26694 Case Time Limit: 2000MSDescriptionFor...

2017-09-28 19:47:09

阅读数:507

评论数:0

C - Aladdin and the Flying Carpet(算术基本定理)

It’s said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the f...

2017-09-27 09:49:45

阅读数:304

评论数:0

E - Just a Hook(线段树+区间更新)

In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metalli...

2017-09-26 21:48:06

阅读数:254

评论数:0

D - Mayor's posters (线段树+离散化)

The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all p...

2017-09-26 20:06:16

阅读数:141

评论数:0

C - A Simple Problem with Integers (线段树lazy区间增减)

You have N integers, A1, A2, … , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number ...

2017-09-25 18:44:39

阅读数:133

评论数:0

B - I Hate It(线段树)

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

2017-09-25 15:16:14

阅读数:159

评论数:0

A - 敌兵布阵(树状数组+线段树模板)

C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发...

2017-09-23 20:52:16

阅读数:153

评论数:0

L - Fantasy of a Summation(快速幂)

If you think codes, eat codes then sometimes you may get stressed. In your dreams you may see huge codes, as I have seen once. Here is the code I saw...

2017-09-22 15:30:51

阅读数:151

评论数:0

A - A Dangerous Maze(期望)

You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for al...

2017-09-21 21:15:43

阅读数:136

评论数:0

U - Primes (素数筛)

Write a program to read in a list of integers and determine whether or not each number is prime. A number, n, is prime if its only divisors are 1 and...

2017-09-20 17:23:14

阅读数:186

评论数:0

E - Leading and Trailing (快速幂+double)

You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits of nk. InputInput st...

2017-09-20 16:55:26

阅读数:407

评论数:0

F - Goldbach`s Conjecture(素数筛)

Goldbach’s conjecture is one of the oldest unsolved problems in number theory and in all of mathematics. It states:Every even integer, greater than 2...

2017-09-20 09:12:01

阅读数:231

评论数:0

Link/Cut Tree(大数)

Programmer Rostislav got seriously interested in the Link/Cut Tree data structure, which is based on Splay trees. Specifically, he is now studying th...

2017-09-20 08:46:06

阅读数:400

评论数:0

A - Bi-shoe and Phi-shoe(素数筛)

Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for hi...

2017-09-20 08:42:02

阅读数:285

评论数:0

顺序表应用7:最大子段和之分治递归法

顺序表应用7:最大子段和之分治递归法 Time Limit: 10MS Memory Limit: 400KB Problem Description给定n(1<=n<=50000)个整数(可能为负数)组成的序列a[1],a[2],a[3],…,a[n],求该序列如a[i]+a[i...

2017-09-19 08:12:19

阅读数:265

评论数:0

M - 昂贵的聘礼(Dijkstra)

年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5...

2017-09-16 20:18:46

阅读数:157

评论数:0

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