啥都不会啊!怎么办啊!

Fitz

慢慢来生活总会好起来的!!!

随笔分类 -  线段树

摘要:题意: 求一个子矩阵要求其矩阵内的合最大。 题解: 正常的求最大子矩阵的复杂度是O(n^3) 对于这一题说复杂度过不去,注意到这个题总共只有2000个点关键点在与这里优化 最大子矩阵可以压缩矩阵变成最大字段和问题 然后可以通过带修改的最大字段和维护这2000个点,复杂度就变成了了O(n^2logn) 阅读全文
posted @ 2019-08-08 00:30 Fitz~ 阅读(203) 评论(0) 推荐(0)
摘要:GTY has nn gay friends. To manage them conveniently, every morning he ordered all his gay friends to stand in a line. Every gay friend has a character 阅读全文
posted @ 2018-10-10 20:40 Fitz~ 阅读(1013) 评论(0) 推荐(0)
摘要:There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xx , yy ) means the wave is a rectangle whose vertexes are 阅读全文
posted @ 2018-09-09 18:53 Fitz~ 阅读(599) 评论(0) 推荐(0)
摘要:Tamref love random numbers, but he hates recurrent relations, Tamref thinks that mainstream random generators like the linear congruent generator suck 阅读全文
posted @ 2018-08-21 21:58 Fitz~ 阅读(258) 评论(0) 推荐(0)
摘要:There is a rooted tree with n nodes, number from 1-n. Root’s number is 1.Each node has a value ai. Initially all the node’s value is 0. We have q oper 阅读全文
posted @ 2018-08-21 21:53 Fitz~ 阅读(201) 评论(0) 推荐(0)
摘要:A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Ea 阅读全文
posted @ 2018-07-29 23:09 Fitz~ 阅读(403) 评论(0) 推荐(0)
摘要:There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the i 阅读全文
posted @ 2018-07-29 23:02 Fitz~ 阅读(203) 评论(0) 推荐(0)
摘要:给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000),代表矩形的数量,然后是N行数据,每一行包含四个浮点数,代表平面上的一个矩形的左上角坐标和右下 阅读全文
posted @ 2018-07-29 23:01 Fitz~ 阅读(321) 评论(0) 推荐(0)
摘要:约会安排 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2705 Accepted Submission(s): 768 Problem Des 阅读全文
posted @ 2018-07-28 19:35 Fitz~ 阅读(215) 评论(0) 推荐(0)
摘要:Transformation Time Limit: 15000/8000 MS (Java/Others) Memory Limit: 65535/65536 K (Java/Others)Total Submission(s): 7144 Accepted Submission(s): 1811 阅读全文
posted @ 2018-07-27 23:31 Fitz~ 阅读(412) 评论(0) 推荐(0)
摘要:Problem Description In a galaxy far, far away, there are two integer sequence a and b of length n.b is a static permutation of 1 to n. Initially a is 阅读全文
posted @ 2018-07-25 22:42 Fitz~ 阅读(349) 评论(0) 推荐(0)
摘要:Mayor's posters Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 73869 Accepted: 21303 Description The citizens of Bytetown, AB, could not s 阅读全文
posted @ 2018-05-18 23:20 Fitz~ 阅读(237) 评论(0) 推荐(0)
摘要:Description A string consisting only of parentheses ‘(’ and ‘)’ is called balanced if it is one of the following. A string “()” is balanced. Concatena 阅读全文
posted @ 2018-05-08 13:42 Fitz~ 阅读(248) 评论(0) 推荐(0)
摘要:链接:https://www.nowcoder.com/acm/contest/105/H来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制: 阅读全文
posted @ 2018-04-29 21:53 Fitz~ 阅读(470) 评论(0) 推荐(2)
摘要:The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj. For a given sequence o 阅读全文
posted @ 2018-03-05 00:14 Fitz~ 阅读(135) 评论(0) 推荐(0)
摘要:很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行, 阅读全文
posted @ 2018-03-04 21:54 Fitz~ 阅读(130) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-03-04 19:07 Fitz~ 阅读(200) 评论(0) 推荐(0)
摘要:C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生 阅读全文
posted @ 2018-03-04 17:40 Fitz~ 阅读(150) 评论(0) 推荐(0)
摘要:Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided t 阅读全文
posted @ 2018-03-04 16:21 Fitz~ 阅读(151) 评论(0) 推荐(0)