随笔分类 -  线段树和树状数组

1 2 下一页

POJ 2155 Matrix (二维线段树)
摘要:MatrixTime Limit:3000MSMemory Limit:65536KTotal Submissions:17226Accepted:6461DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i,... 阅读全文

posted @ 2014-05-23 23:35 kuangbin 阅读(3752) 评论(0) 推荐(0)

POJ 2155 Matrix (二维树状数组)
摘要:MatrixTime Limit:3000MSMemory Limit:65536KTotal Submissions:17224Accepted:6460DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i,... 阅读全文

posted @ 2014-05-23 22:52 kuangbin 阅读(4013) 评论(1) 推荐(0)

HDU 4819 Mosaic (二维线段树)
摘要:MosaicTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 213Accepted Submission(s): 50Problem Desc... 阅读全文

posted @ 2014-05-23 12:07 kuangbin 阅读(4070) 评论(0) 推荐(0)

SGU 311. Ice-cream Tycoon(线段树)
摘要:311. Ice-cream TycoonTime limit per test: 0.5 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardYou've recently started an ice-crea... 阅读全文

posted @ 2014-05-02 12:44 kuangbin 阅读(1372) 评论(0) 推荐(0)

SGU 319. Kalevich Strikes Back (线段树)
摘要:319. Kalevich Strikes BackTime limit per test: 0.5 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardAnd yet again the Berland comm... 阅读全文

posted @ 2014-05-02 11:44 kuangbin 阅读(605) 评论(0) 推荐(0)

HDU 3974 Assign the task(简单线段树)
摘要:Assign the taskTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 636Accepted Submission(s): 322Problem DescriptionThere is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader 阅读全文

posted @ 2013-11-17 22:24 kuangbin 阅读(3566) 评论(0) 推荐(1)

HDU 4747 Mex (2013杭州网络赛1010题,线段树)
摘要:MexTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 623Accepted Submission(s): 209Problem DescriptionMex is a function on a set of integers, which is universally used for impartial game theorem. For a non-negative integer set S, mex(S) is defined a 阅读全文

posted @ 2013-09-17 23:50 kuangbin 阅读(3227) 评论(0) 推荐(1)

HDU 4578 Transformation (线段树)
摘要:TransformationTime Limit: 15000/8000 MS (Java/Others)Memory Limit: 65535/65536 K (Java/Others)Total Submission(s): 49Accepted Submission(s): 16Problem DescriptionYuanfang is puzzled with the question below:There are n integers, a1, a2, …, an. The initial values of them are 0. There are four kinds of 阅读全文

posted @ 2013-08-10 18:08 kuangbin 阅读(3344) 评论(0) 推荐(0)

HDU 4614 Vases and Flowers (2013多校2 1004 线段树)
摘要:Vases and FlowersTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 38Accepted Submission(s): 10Problem Description Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flowers,. 阅读全文

posted @ 2013-07-25 17:33 kuangbin 阅读(2094) 评论(0) 推荐(0)

HDU 4602 Magic Ball Game(离线处理,树状数组,dfs)
摘要:Magic Ball GameTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 640Accepted Submission(s): 169Problem DescriptionWhen the magic ball game turns up, Kimi immediately falls in it. The interesting game is made up of N balls, each with a weight of w[i] 阅读全文

posted @ 2013-07-25 10:32 kuangbin 阅读(650) 评论(0) 推荐(0)

HDU 4553 约会安排 (线段树,区间合并)
摘要:约会安排Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 147Accepted Submission(s): 47Problem Description 寒假来了,又到了小明和女神们约会的季节。 小明虽为屌丝级码农,但非常活跃,女神们常常在小明网上的大段发言后热情回复“呵呵”,所以,小明的最爱就是和女神们约会。与此同时,也有很多基友找他开黑,由于数量实在过于巨大,怎么安排时间便成了小明的一大心事。 我们已知小明一共有T的空闲时间,期间会有... 阅读全文

posted @ 2013-05-20 18:29 kuangbin 阅读(1844) 评论(0) 推荐(1)

HDU 3642 Get The Treasury(线段树,求立方体交)
摘要:Get The TreasuryTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1408Accepted Submission(s): 440Problem DescriptionJack knows that there is a great underground treasury in a secret region. And he has a special device that can be used to detect trea 阅读全文

posted @ 2013-04-11 17:01 kuangbin 阅读(1260) 评论(1) 推荐(0)

POJ 1177 Picture (线段树,求矩形并的轮廓面积)
摘要:PictureTime Limit:2000MSMemory Limit:10000KTotal Submissions:8975Accepted:4741DescriptionA number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially or totally covered by the other 阅读全文

posted @ 2013-04-10 23:45 kuangbin 阅读(2219) 评论(0) 推荐(0)

POJ 3225 Help with Intervals (线段树,区间成段更新)
摘要:Help with IntervalsTime Limit:6000MSMemory Limit:131072KTotal Submissions:7850Accepted:1818Case Time Limit:2000MSDescriptionLogLoader, Inc. is a company specialized in providing products for analyzing logs. While Ikki is working on graduation design, he is also engaged in an internship at LogLoader. 阅读全文

posted @ 2013-04-10 19:20 kuangbin 阅读(774) 评论(0) 推荐(1)

HDU 4417 Super Mario 第37届ACM/ICPC 杭州赛区网络赛1008题(树状数组或者线段树)
摘要:Super MarioTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 80Accepted Submission(s): 42Problem DescriptionMario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble agai 阅读全文

posted @ 2012-09-23 19:39 kuangbin 阅读(2047) 评论(8) 推荐(0)

HDU 4419 Colourful Rectangle 第37届ACM/ICPC 杭州赛区网络赛 1010题 (线段树)
摘要:Colourful RectangleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12Accepted Submission(s): 3Problem DescriptionWe use Red, Green and Blue to make new colours. See the picture below:Now give you n rectangles, the colour of them is red or green or 阅读全文

posted @ 2012-09-23 17:14 kuangbin 阅读(1376) 评论(0) 推荐(0)

HDU 4288 Coder 第37届ACM/ICPC 成都赛区网络赛1001题 (线段树)
摘要:CoderTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 120Accepted Submission(s): 52Problem Description In mathematics and computer science, an algorithm describes a set of procedures or instructions that define a procedure. The term has become in. 阅读全文

posted @ 2012-09-16 19:29 kuangbin 阅读(1320) 评论(0) 推荐(0)

HDU 4302 Holedox Eating(优先队列或者线段树)
摘要:Holedox EatingTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1830Accepted Submission(s): 634Problem DescriptionHoledox is a small animal which can be considered as one point. It lives in a straight pipe whose length is L. Holedox can only move alo 阅读全文

posted @ 2012-08-30 19:27 kuangbin 阅读(1111) 评论(0) 推荐(0)

HDU 1542 Atlantis(矩形面积并)
摘要:AtlantisTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3469Accepted Submission(s): 1549Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts 阅读全文

posted @ 2012-08-15 22:00 kuangbin 阅读(1254) 评论(0) 推荐(0)

HDU 1255 覆盖的面积(矩形面积交)
摘要:覆盖的面积Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2304Accepted Submission(s): 1136Problem Description给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积.Input输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000),代表矩形的数量,然后是N行数据,每一行包含四个浮点数,代 阅读全文

posted @ 2012-08-15 21:59 kuangbin 阅读(3894) 评论(0) 推荐(0)

1 2 下一页

导航

JAVASCRIPT: