摘要: /*莫队算法是离线算法,用来解决已知l,r问你l,r里面值的问题对块进行排序,后面的块通过前面的块左移右移得到,所以可能有的情况能得到O(1)或者较低的复杂度排序的时候除以跟好n(?)本题题意:从l到r区间内问有多少个不同的数,询问很多*/#include#include#include#inclu... 阅读全文
posted @ 2015-07-16 20:53 Painting、时光 阅读(471) 评论(0) 推荐(0) 编辑
摘要: DescriptionA tourist hiked along the mountain range. The hike lasted forndays, during each day the tourist noted height above the sea level. On thei-t... 阅读全文
posted @ 2015-07-16 20:27 Painting、时光 阅读(194) 评论(0) 推荐(0) 编辑
摘要: There arenpiles of pebbles on the table, thei-th pile containsaipebbles. Your task is to paint each pebble using one of thekgiven colors so that for e... 阅读全文
posted @ 2015-07-16 20:21 Painting、时光 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Andrewid the Android is a galaxy-famous detective. He is now investigating the case of vandalism at the exhibition of contemporary art.The main exhibi... 阅读全文
posted @ 2015-07-16 20:16 Painting、时光 阅读(212) 评论(0) 推荐(0) 编辑
摘要: You have a positive integermand a non-negative integers. Your task is to find the smallest and the largest of the numbers that have lengthmand sum of ... 阅读全文
posted @ 2015-07-16 20:13 Painting、时光 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Jeff's gotncards, each card contains either digit 0, or digit 5. Jeff can choose several cards and put them in a line so that he gets some number. Wha... 阅读全文
posted @ 2015-07-16 20:10 Painting、时光 阅读(174) 评论(0) 推荐(0) 编辑