随笔分类 - ACM — 线段树
1
摘要:http://acm.sdibt.edu.cn/JudgeOnline/problem.php?id=3237Problem H:Boring CountingTime Limit: 3 Sec Memory Limit: 128 MB Submit: 8 Solved: 4 [Submit][Status][Discuss]DescriptionIn this problem you are given a number sequence P consisting of N integer and Pi is the ith element in the sequence. Now you
阅读全文
摘要:http://poj.org/problem?id=3277City HorizonTime Limit:2000MSMemory Limit:65536KTotal Submissions:15255Accepted:4111DescriptionFarmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildi
阅读全文
摘要:http://acm.fzu.edu.cn/problem.php?pid=2105Problem DescriptionGiven N integers A={A[0],A[1],...,A[N-1]}. Here we have some operations:Operation 1: AND opn L RHere opn, L and R are integers.For L≤i≤R, we do A[i]=A[i] AND opn (here "AND" is bitwise operation).Operation 2: OR opn L RHere opn,
阅读全文
摘要:http://poj.org/problem?id=3468A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:46488Accepted:13633Case Time Limit:2000MSDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to
阅读全文
摘要:题目地址:http://poj.org/problem?id=2777Count ColorTime Limit:1000MSMemory Limit:65536KTotal Submissions:30995Accepted:9285DescriptionChosen 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 wit
阅读全文
摘要:http://poj.org/problem?id=3667HotelTime Limit:3000MSMemory Limit:65536KTotal Submissions:9484Accepted:4066DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superior. Bessie, ever the competent travel agent,
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3333Turing TreeTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2614 Accepted Submission(s): 892 Problem DescriptionAfter inventing Turing Tree, 3xian always felt boring when solving problems about interva
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3308LCISTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2959 Accepted Submission(s): 1287 Problem DescriptionGiven n integers. You have two operations: U A B: replace the Ath number by B. (index counting
阅读全文
摘要:http://poj.org/problem?id=2528Mayor's postersTime Limit:1000MSMemory Limit:65536KTotal Submissions:34372Accepted:9954DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim
阅读全文
摘要:http://poj.org/problem?id=2828Buy TicketsTime Limit:4000MSMemory Limit:65536KTotal Submissions:10478Accepted:5079DescriptionRailway 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 approaching, but unluckily the Li
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1540Tunnel WarfareTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3168 Accepted Submission(s): 1216 Problem DescriptionDuring the War of Resistance Against Japan, tunnel warfare was carried out extensivel
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1754I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 26663 Accepted Submission(s): 10596 Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1698Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 12534 Accepted Submission(s): 6242 Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2795BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7320 Accepted Submission(s): 3281 Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h i
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1828PictureTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2135 Accepted Submission(s): 1134 Problem DescriptionA number of rectangular posters, photographs and other pictures of the same shape are pasted
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1255覆盖的面积Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2933 Accepted Submission(s): 1447 Problem Description给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积.Input输入数据的第一行是一个正整数T(1=2,计算面积,改变其cover值:cover+=line3.flag,因为li
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3303Harmony ForeverTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 813 Accepted Submission(s): 222 Problem DescriptionWe believe that every inhabitant of this universe eventually will find a way to live
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2665[ poj 21042761 ] 改变一下输入就可以过http://poj.org/problem?id=2104http://poj.org/problem?id=2761Kth numberTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3266 Accepted Submission(s): 1090 Problem DescriptionG
阅读全文
摘要:http://ac.nbutoj.com/Problem/view.xhtml?id=1438[1438] Get Up, Soldier!时间限制: 1000 ms 内存限制: 65535 K问题描述小日本真是越来越嚣张了,不过我军也不是吃素的。为了能够痛击小日本,我军决定近日举行一个军事演习,演戏的方式是红蓝两军在长城两侧对峙,双方都想要拿下对方阵地。目前双方正僵持在长城上。作为蓝军司令,你迫切想要知道长城上的战况。为简单起见,假设长城是一维的,坐标从1到n。你的部下每一次都会送来一个情报:从X到Y位置的战况被逆转了。这个逆转的意思就是,假如这个位置本是蓝军占领,那么现在被红军占领了,反之
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1166Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以Tidy要随时向Derek汇报某一段连续的工兵营地一共有多少人,例如De
阅读全文
1