自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Count Color (线段树,区间更新)

Problem DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There is a very long board with

2017-09-28 23:49:46 243

原创 日记(周中)

这周的周二,补做了一下周一的div2的题,这几道题应该比较简单,做出的人很多,而且3,4题做出的都比较多,我也做了一下,确实,第1,2题基本都是模拟类的水题,只需要逻辑,条理清晰即可,当然最重要的是读懂题就可以了,我就是因为一开始读题没有读好,所以错了好多次,因为理解错要求的内容了。后来扫了一眼第3题,是一个模拟题,第四题,是一个贪心的题,当时没时间写了,就不做了。其实,感觉自己把这些题转化为代码

2017-09-28 21:50:01 179

原创 Billboard (线段树,多维)

Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible announcements

2017-09-26 16:03:44 243

原创 B. Polycarp and Letters

Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters.Let A be a set of positions in the string. Let's cal

2017-09-26 16:00:18 873

原创 A. Fair Game

Petya and Vasya decided to play a game. They have n cards (n is an even number). A single integer is written on each card.Before the game Petya will choose an integer and after that Vasya will c

2017-09-26 15:54:05 982

原创 日记(周末)

这几天做了几个网络赛,昨天是北京赛区的网络赛,做了半天就做了最简单的那一道题,也就是去北京旅游的那一道题,其实这个就是枚举所有情况,找出最小的旅游人数,我刚开始竟然用了一次dp,蒙了,后来看了第9题,这道题本来以为是暴力,然后暴力,没有ac。后来感觉是树状数组和线段树的题,树状数组不好做(我是没想出来),线段树才学没多久,写了一个错了。真是悲伤。第8题,这道题,刚开始以为是搜索,然后看了一眼数据,

2017-09-24 21:44:39 193

原创 Overlapping Rectangles(线段树,矩形面积并)

There are nn rectangles on the plane. The problem is to find the area of the union of these rectangles. Note that these rectangles might overlap with each other, and the overlapped areas of these re

2017-09-24 21:14:49 573

原创 Train Seats Reservation

You are given a list of train stations, say from the station 11 to the station 100100.The passengers can order several tickets from one station to another before the train leaves the station one.

2017-09-24 21:11:51 284

原创 Visiting Peking University(水)

Visiting Peking University时间限制:1000ms单点时限:1000ms内存限制:256MB描述Ming is going to travel for n days and the date of these days can be represented by n integers: 0, 1, 2, …, n-

2017-09-24 21:03:49 323

原创 日记(周中)

从这周开始,就要开始做Codeforces里的题了,应该是说做每次的div2,其他的就不做了,毕竟水平不足。    周二晚上的时候做了一下div2,第一道题,用不到什么算法,只是要把所有的分类想清楚,然后按照思路写下去,只要思路没问题,就能ac了,我一开始的时候思路不对,后来思路对了,但是代码有问题,给了之后才过了,我是听说div2前两道题都是水题,3 4题是比 1 2题提升一点的题,后面也都

2017-09-21 20:17:35 172

原创 Codeforces Round #435 (Div. 2)B. Mahmoud and Ehab and the bipartiteness(补)

Mahmoud and Ehab continue their adventures! As everybody in the evil land knows, Dr. Evil likes bipartite graphs, especially trees.A tree is a connected acyclic graph. A bipartite graph is a graph

2017-09-21 20:13:30 224

原创 Codeforces Round #435 A. Mahmoud and Ehab and the MEX

Dr. Evil kidnapped Mahmoud and Ehab in the evil land because of their performance in the Evil Olympiad in Informatics (EOI). He decided to give them some problems to let them go.Dr. Evil is intere

2017-09-20 00:37:13 316

原创 日记(周末)

这几天参加了几个网络赛,分别是西安和青岛的网络赛,打的真是一把心酸泪,西安的网络赛吃了一个鸡蛋,真是太爽了,后来看题解,有一个找规律的题已经快要做出来了,可惜没有迈出最后一步,那个题名为sum。当时已经找出和10001这种形式的数有关了,但是一直没想当这个数包含233个1的时候会发生什么事,还是思路没有拓展开。其他的题大多距离答案甚远,难题更不用说了。    今天参加了青岛赛区的网络赛,一共出

2017-09-17 16:09:57 190

原创 日记(周中)

学习了线段树的内容。首先是线段更新,一般的都是用一个标记,记录这个节点的下面是否需要更新一下,这样的话,每次循环递归更新的时候就不用更新到最下面了,只需要标记一下就行了,接下来,如果更新到这里或者查询到这里,然后再更新,如果没有直接用到这里,就不需要更新了,这样会节省很多时间,这是线段更新的基本操作了。    线段树和树状数组一样都有离散化,但是和它也有很大不同,就是其中有的数字之间间隔大于一

2017-09-14 20:11:08 199

原创 Just a Hook (区间更新)

Problem DescriptionIn 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 metallic sticks which are of the same

2017-09-14 20:08:54 250

原创 日记(周末)

又是一周的结束了,首先,先说一下周六周日这两天参加的网络赛,周六参加了乌鲁木齐的网络赛,那天下午满怀激情的打开网页,结果,因为服务器问题,卡了好久,然后开始看题,三路进军,我从后面开始看,其实直接跳到h题,看了看感觉是图论的题,然后忽然发现c题和a题,猛然爆发了好多人,然后开始有人做a,c题,学长做出了c题,后来我直接打开a题,顺着思路,没有用算法,把a题暴力了,感觉这个就是三个集合,abc,a和

2017-09-10 22:34:45 174

原创 日记(周末)

这几天,看了一下线段树的题,其实,感觉在某些方面树状数组比线段树好用,代码少,这可能只是在简单的线段树问题上,刚做了一个线段树求最值得问题,这个问题还没涉及到线段树的核心用法,区间更新,在这里只是用到了单点更新和区间求最大值。而且学习了线段树,感觉这个知识点和老师以前讲的二叉排序树有很多相似的地方,都是从左到右,是有顺序的,不过,二叉排序树排的是点,这里的一个点代表了一段数,难道,线段树就是这么来

2017-09-03 19:40:32 161

原创 I Hate It (线段树单点更新,求最值)

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

2017-09-03 19:20:57 170

空空如也

空空如也

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

TA关注的人

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