转自 http://i.cnblogs.com/EditPosts.aspx?opt=1 研究生最后一年,我参加了一个500强外企实习,单纯幼稚的小姑娘立马被白领工作的那种光鲜亮丽给迷惑了,同时听说可能解决户口,所以就一心想着好好表现,毕业后留在那里.直到毕业那年的3月份,我才郁闷地得知这个外企不能给我解决北京户口,连正式员工编制都没有,只和我签订contractor的合同.埋怨supervisor过分,后悔自己傻之外,我立刻决心去找个解决户口,至少能把我当employee的工作,之前我都没有好…
A Simple Stone Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem Description After he has learned how to play Nim game, Bob begins to try another ston…
Permutation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0Special Judge Problem Description A permutation p1,p2,...,pn of 1,2,...,n is called a lucky permutatio…
A - Palindrome 题意:给出一个字符串,找出其中有多少个子串满足one-half-palindromic 的定义 思路:其实就是找一个i, j  使得 以i为中轴的回文串长度和以j为中轴的回文串长度都大于j - i + 1 先Manacher 预处理出以每个字符为中轴的最长回文串长度,然后用树状数组维护j ,枚举i #include<bits/stdc++.h> using namespace std; typedef long long ll; ; int l; ]; ]; in…
Palindrome Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 426    Accepted Submission(s): 163 Problem Description Alice like strings, especially long strings. For each string, she has a specia…
A Simple Stone Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1526    Accepted Submission(s): 346 Problem Description After he has learned how to play Nim game, Bob begins to try another…
Super-palindrome 题面地址:http://acm.hdu.edu.cn/downloads/CCPC2018-Hangzhou-ProblemSet.pdf 这道题是差分数组的题目,线段树也可以写,但是代码太长没必要. 代码: #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> #include<…
A Simple Stone Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem Description After he has learned how to play Nim game, Bob begins to try another ston…
Permutation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0Special Judge Problem Description A permutation p1,p2,...,pn of 1,2,...,n is called a lucky permutatio…
原题: 题意: 给你一个长度为N的正整数组A,对于这个数组的所有子区间,若长度小于k则不管它,若长度大于等于k则取第k大放入数组B 问你B中第M大的数是谁 一眼序列分治,然而没思路 数据结构?能想到从大到小排序,然后小于第i个数的都视为1,用数据结构维护第i个数在多少个区间是第k大 然后就没有然后了…… 序列分治和数据结构自闭了两个小时,最后才想起来试试别的思路 比如DP或二分什么的 终于灵稽一动 答案满足二分单调性 二分的答案m越大,[m+1,n]中的数作为第k大的区间的总数量就越大 那么二分…