
STL库的应用
文章平均质量分 84
RJ28
小学生
展开
-
Codeforces Round #298 (Div. 2) D. Handshakes
On February, 30th n students came in the Center for Training Olympiad Programmers (CTOP) of the Berland State University. They came one by one, one after another. Each of them went in, and before sitt原创 2016-05-24 10:19:51 · 393 阅读 · 0 评论 -
POJ-3007 Organize Your Train part II (字符串hash)
DescriptionRJ Freight, a Japanese railroad company for freight operations has recently constructed exchange lines at Hazawa, Yokohama. The layout of the lines is shown in Figure 1.Figure 1: La原创 2016-06-05 21:36:43 · 1430 阅读 · 0 评论 -
POJ-3017 Cut the Sequence(DP单调队列优化 + 平衡树)
DescriptionGiven an integer sequence { an } of length N, you are to cut the sequence into several parts every one of which is a consecutive subsequence of the original sequence. Every part must sa原创 2016-07-14 18:00:35 · 702 阅读 · 0 评论 -
Codeforces Round #361 (Div. 2) E. Mike and Geometry Problem (离散化)
Mike wants to prepare for IMO but he doesn't know geometry, so his teacher gave him an interesting geometry problem. Let's definef([l, r]) = r - l + 1 to be the number of integer points in the segme原创 2016-07-19 10:21:49 · 718 阅读 · 0 评论 -
LA 7324 Promotions(bitset)
题意:给你一个SAG,你可以选一个点,但拓扑序在其后的点也要选,让你选a和b个点,问有哪些点必须被选中,最后还问了选b个点哪些一定不被选中。分析:比赛时写了n^2的暴力跑过了,正解是BITSET压缩一下一个点的前驱集合和后驱集合。#include#include#include#include#include#include#include#include#原创 2016-08-14 00:49:52 · 290 阅读 · 0 评论 -
Codeforces Round #404 (Div. 2) E. Anton and Permutation(分块+二分)
Anton likes permutations, especially he likes to permute their elements. Note that a permutation of n elements is a sequence of numbers{a1, a2, ..., an}, in which every number from 1 to n appears原创 2017-03-18 23:12:55 · 344 阅读 · 0 评论 -
Hdu-4666 Hyperspace(曼哈顿距离)
The great Mr.Smith has invented a hyperspace particle generator. The device is very powerful. The device can generate a hyperspace. In the hyperspace, particle may appear and disappear randomly. At th原创 2017-08-06 11:43:50 · 288 阅读 · 0 评论