自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

转载 2019牛客暑期多校训练营(第一场)A题【单调栈】(补题)

链接:https://ac.nowcoder.com/acm/contest/881/A来源:牛客网题目描述Two arrays u and v each with m distinct elements are called equivalent if and only ifRMQ(u,l,r)=RMQ(v,l,r)RMQ(u,l,r)=RMQ(v,l,r)for all...

2019-09-20 19:59:00 74

转载 Educational Codeforces Round 34 (Rated for Div. 2) B题【打怪模拟】

B. The ModcrabVova is again playing some computer game, now an RPG. In the game Vova's character received a quest: to slay the fearsome monster called Modcrab.After two hours of playing the gam...

2019-09-19 20:43:00 331

转载 Codeforces Round #402 (Div. 2) D题 【字符串二分答案+暴力】

D. String GameLittle Nastya has a hobby, she likes to remove some letters from word, to obtain another word. But it turns out to be pretty hard for her, because she is too young. Therefore, her b...

2019-09-18 20:17:00 186

转载 区间求和【莫队板子题】牛客小白月赛17

题目:给你n个数,每个数为ai​,现在有m个询问,每个询问l,r,需要求出:代表ai​在这个区间中出现的次数。题目链接:https://ac.nowcoder.com/acm/contest/1085/G输入:10 51 3 2 4 5 6 4 5 6 71 52 53 41 103 7输出:151467329...

2019-09-18 11:29:00 127

转载 Codeforces Round #455 (Div. 2) D题(花了一个早自习补了昨晚的一道模拟QAQ)

D. Colorful PointsYou are given a set of points on a straight line. Each point has a color assigned to it. For point a, its neighbors are the points which don't have any other points between them...

2019-09-18 09:43:00 88

转载 Codeforces Round #346 (Div. 2) E题 并查集找环

E. New ReformBerland has n cities connected by m bidirectional roads. No road connects a city to itself, and each pair of cities is connected by no more than one road. It is not guaranteed that y...

2019-09-12 18:23:00 281

转载 Codeforces Round #346 (Div. 2) C题

C. Tanya and ToysIn Berland recently a new collection of toys went on sale. This collection consists of 109 types of toys, numbered with integers from 1 to 109. A toy from the new collection of t...

2019-09-12 18:20:00 94

转载 Codeforces Round #346 (Div. 2) B题

B. Qualifying ContestVery soon Berland will hold a School Team Programming Olympiad. From each of the m Berland regions a team of two people is invited to participate in the olympiad. The qualify...

2019-09-12 18:18:00 134

转载 Codeforces Round #346 (Div. 2) A题 [一道让我生气的思维题·]

A. Round HouseVasya lives in a round building, whose entrances are numbered sequentially by integers from 1 to n. Entrance n and entrance 1 are adjacent.Today Vasya got bored and decided to tak...

2019-09-12 18:14:00 73

转载 Educational Codeforces Round 33 (Rated for Div. 2) D题 【贪心:前缀和+后缀最值好题】

D. Credit CardRecenlty Luba got a credit card and started to use it. Let's consider n consecutive days Luba uses the card.She starts with 0 money on her account.In the evening of i-th day a t...

2019-09-12 15:53:00 280

转载 Educational Codeforces Round 33 (Rated for Div. 2) C题·(并查集变式)

C. RumorVova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and it bec...

2019-09-12 11:43:00 550

转载 Educational Codeforces Round 33 (Rated for Div. 2) B题

B. Beautiful DivisorsRecently Luba learned about a special kind of numbers that she calls beautiful numbers. The number is called beautiful iff its binary representation consists of k + 1 consecu...

2019-09-12 11:40:00 75

转载 Educational Codeforces Round 33 (Rated for Div. 2) A题

A. Chess For ThreeAlex, Bob and Carl will soon participate in a team chess tournament. Since they are all in the same team, they have decided to practise really hard before the tournament. But it...

2019-09-12 11:38:00 80

转载 Codeforces Round #456 (Div. 2) B题

B. New Year's Evetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSince Grisha behaved well last year, at New Year's Eve he was visited by Ded ...

2019-09-11 19:24:00 98

转载 公共钥匙盒(CCF)【模拟】

问题描述  有一个学校的老师共用N个教室,按照规定,所有的钥匙都必须放在公共钥匙盒里,老师不能带钥匙回家。每次老师上课前,都从公共钥匙盒里找到自己上课的教室的钥匙去开门,上完课后,再将钥匙放回到钥匙盒中。  钥匙盒一共有N个挂钩,从左到右排成一排,用来挂N个教室的钥匙。一串钥匙没有固定的悬挂位置,但钥匙上有标识,所以老师们不会弄混钥匙。  每次取钥匙的时候,老师们都会找到自己所需要的...

2019-09-11 11:20:00 97

转载 最大的矩形(CCF)

问题描述  在横轴上放了n个相邻的矩形,每个矩形的宽度是1,而第i(1 ≤ i ≤ n)个矩形的高度是hi。这n个矩形构成了一个直方图。例如,下图中六个矩形的高度就分别是3, 1, 6, 5, 2, 3。  请找出能放在给定直方图里面积最大的矩形,它的边要与坐标轴平行。对于上面给出的例子,最大矩形如下图所示的阴影部分,面积是10。输入格式  第一行包含一个整数n,即矩形的数量...

2019-09-10 08:52:00 284

转载 雀士分麻将( 北京理工大学2019年计算机学院小学期程序设计方法与实践)

一年一度的日麻大赛结束啦,作为本场比赛的主裁判汪次郎要给大家发奖品了一姬、二阶堂美树、三上千织等雀士排成一排,等待发奖品。本届比赛的奖品为麻将,发奖规则如下:每个人都有一个自己的分数ai,代表本次比赛中获得的成绩。每个选手至少可以获得1张麻将作为奖励。如果两位选手站位相邻,积分高的选手一定比积分低的选手获得的麻将多。作为主裁判的汪次郎,当然想减少在奖品上的...

2019-09-09 20:43:00 524

转载 麻将桌绘制 ( 北京理工大学2019年计算机学院小学期程序设计方法与实践)

麻将桌绘制一年一度的日麻大赛就要开始啦,各位雀士狭路相逢勇者胜。除了赛场上大家的巅峰精彩对决以外,为了增加比赛的观赏性,还需要一个好看的牌桌,那你帮设计师绘制一个牌桌吧。比赛在一张长为w,宽为h的桌子上进行绘制,为了方便描述,我们进行了以下定义:我们把桌子可以分成w×h个方格,每个方格的大小为1×1。我们定义方格的中心点为其坐标。因此对于每个中心点(x,y),其实际方格范围为...

2019-09-09 20:38:00 784

转载 牛客练习赛51 D题

链接:https://ac.nowcoder.com/acm/contest/1083/D来源:牛客网 有一个草原可以用一个1~400的数轴表示。有n头羊和q个查询。每头羊的编号分别是1,2,3…n。第i头羊只喜爱数轴上[ai,bi]这样的一个闭区间,每一时刻每头羊只可能在自己喜爱的区间的某个点上吃草。现在给出q个查询,每个查询两个整数l,r。你需要计算出在同一时刻,最多能有多少头羊同时...

2019-09-07 09:56:00 87

转载 Educational Codeforces Round 72 (Rated for Div. 2) C题

C. The Number Of Good SubstringsProblem Description:You are given a binary string s (recall that a string is binary if each character is either 0 or 1).Let f(t) be the decimal representation ...

2019-09-06 17:13:00 60

转载 Codeforces Round #583 (Div. 1 + Div. 2, based on Olympiad of Metropolises) C题

C. Bad SequenceProblem Description:  Petya's friends made him a birthday present — a bracket sequence. Petya was quite disappointed with his gift, because he dreamed of correct bracket sequen...

2019-09-06 13:58:00 147

转载 Codeforces Round #583 (Div. 1 + Div. 2, based on Olympiad of Metropolises) A题

A. Optimal Currency ExchangeAndrew was very excited to participate in Olympiad of Metropolises. Days flew by quickly, and Andrew is already at the airport, ready to go home. He has n rubles left,...

2019-09-06 13:49:00 116

转载 Codeforces Round #583 (Div. 1 + Div. 2, based on Olympiad of Metropolises) A题

A. Optimal Currency ExchangeProblem Description:Andrew was very excited to participate in Olympiad of Metropolises. Days flew by quickly, and Andrew is already at the airport, ready to go hom...

2019-09-06 13:45:00 239

转载 Educational Codeforces Round 72 (Rated for Div. 2) B题

Problem Description:You are fighting with Zmei Gorynich — a ferocious monster from Slavic myths, a huge dragon-like reptile with multiple heads!Initially Zmei Gorynich has x heads. You can deal...

2019-09-06 13:35:00 183

转载 Educational Codeforces Round 72 (Rated for Div. 2) A题

Problem Description:You play your favourite game yet another time. You chose the character you didn't play before. It has str points of strength and int points of intelligence. Also, at start, ...

2019-09-06 12:23:00 93

空空如也

空空如也

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

TA关注的人

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