- 博客(7)
- 收藏
- 关注
原创 soj1041. Pushing Boxes
#include#include#include#include#include#include#define maxn 210001using namespace std;int N,M,K;int a[maxn],sa[maxn],rank[maxn],height[maxn];int wb[maxn],wv[maxn],sw[maxn],wa[maxn],b[maxn],
2015-04-15 21:14:09
387
转载 三维偏序
太神奇的,二分的魅力给定N个没有顺序三元组(xi,yi,zi),求其中能构成最长上升序列的长度,大于的定义为(xi>xj && yi>yj && zi>zi)1.在处理区间[L,R]的时候,先二分区间[L, (L+R)/ 2],递归求这个左区间(二分的原因是我在维护y维的时候难免破坏x维的性质,但是二分之后我还是可以保证左区间的x全都大于右区间的x)。(注意对x排序的时候,如果
2015-01-29 23:45:42
448
原创 soj1005. Roll Playing Games
1005. Roll Playing GamesConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionPhil Kropotnik is a game maker, and one common problem he runs into is determining the s
2014-12-30 23:12:40
710
原创 soj1003. Hit or Miss
1003. Hit or MissConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionOne very simple type of solitaire game known as "Hit or Miss" (also known as "Frustration," "Harvest,"
2014-09-04 22:21:24
572
原创 soj1002 Anti-prime Sequences
1002. Anti-prime SequencesConstraintsTime Limit: 3 secs, Memory Limit: 32 MB DescriptionGiven a sequence of consecutive integers n,n+1,n+2,...,m, an anti-prime sequence is a rear
2014-09-03 23:38:15
970
原创 soj1001. Alphacode简单动规
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionAlice and Bob need to send secret messages to each other and are discussing ways to encode their messages: Alice: "Let's just us
2014-08-30 23:29:20
518
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人