随笔分类 -  线段树

摘要:Count ColorTime Limit:1000MSMemory Limit:65536KTotal Submissions:33098Accepted:9995DescriptionChosen 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 length L centimeter, L is a posit 阅读全文
posted @ 2014-03-06 20:10 ~~Snail~~ 阅读(162) 评论(0) 推荐(0)
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:53810Accepted:16150Case 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 each number in a given interv 阅读全文
posted @ 2014-03-06 10:30 ~~Snail~~ 阅读(134) 评论(0) 推荐(0)
摘要:Count the ColorsTime Limit:2 Seconds Memory Limit:65536 KBPainting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.Your task is counting the segments of different colors you can see at last.InputThe first line of each data set contains exa 阅读全文
posted @ 2013-12-04 19:16 ~~Snail~~ 阅读(230) 评论(0) 推荐(0)