打了4hours,做出一道题...太菜了.rank:45/107 开场看B,题目看不懂...3hours半才发现i<=N-1,不是i<=x-1.然而还是不会. 看到J有人过了,发现是个简单的树形DP,先处理出根节点的贡献,再O(1)向下转移..于是49min A了J. 然后就没有任何题会了... A?坐标范围这么大?离散化后好像还是无法搞... B?差分?怎么差都差不出... C?不会数论... D?刚开始写了一个自认为正确的DP+矩阵快速幂,然而发现好像无法处理颜色的排列不允许的情况...然…
A.A + B problem(待填坑) B.Cat VS Dog(二分图匹配) 喜欢cat和喜欢dog的人构成了二分图,如果两个人有冲突则连一条边,则问题转化为二分图最大点独立集问题.ans=n-最大匹配. # include <cstdio> # include <cstring> # include <cstdlib> # include <iostream> # include <vector> # include <queue&g…
Rank:56/147. 开场看B,是个线段树区间合并,花了2hour敲完代码...再花了30min查错..发现push_down有问题.改了就AC了. 然后发现A过了很多人.推了个公式,发现是个分段函数.取个中间点代进去结果就AC了. C好像也很水?看了看原来是个傻逼BFS.A了. F化解了一下就 集合子集异或为0的种数.想了想没想到什么东西就go die了. A.Liang Guo Sha(阅读理解) 看懂题意后搞出两个式子,然后取个极值就行了. # include <cstdio> #…
AC: F I. rank 40/88. 开场看了F发现是个简单的DP,随便写了一下WA,,,发现把样例倒着输就过不了了...原来是忘了最后的时候开始上课的话可能上不了多久... 想到一个简洁的状态方程,然后以为是单调队列优化,突然发现好像只需要求个最小值就行了...改改AC了.. 看榜发现I过了很多,看了一下就是个同色三角形裸题..A了然后就没有然后了... 看了一下B.第一感觉KMP,感觉通配符的情况不大好处理...没学AC自动机... C.求多边形的对称轴...但是枚举对称轴好像会TLE?…
A.Color the Simple Cycle(polya计数+字符串匹配) 此题的难点在于确定置换的个数,由a[i+k]=a[i], e[i+k]=e[i]联想到KMP. 于是把原串和原串扩大两倍的目标串进行字符串匹配就能求出具体的置换. 这里的算法可以使用hash或者kmp. 然后套polya公式就行了. #include <iostream> #include <cstdio> #include <cmath> #include <vector> #…
2015 UESTC Winter Training #8 The 2011 Rocky Mountain Regional Contest Regionals 2011 >> North America - Rocky Mountain 开始时貌似是UVAlive挂了,无论交什么都WA,后来转战HDU 这次水题比较多,其中B题据说有更加高级的方法. G题WA了两发,才发现竟然没有输出Case!!! 未完成:D F H I J A - Iterated Difference 水题,模拟迭代即可…
Redraw Beautiful Drawings Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Problem Description Alice and Bob are playing together. Alice is crazy about art and she has visited many museums around the world. She has…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6319 Problem A. Ascending Rating Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 5943    Accepted Submission(s): 2004 Problem Description Before…
tree Time Limit: 8000ms Memory Limit: 262144KB This problem will be judged on HDU. Original ID: 539064-bit integer IO format: %I64d      Java class name: Main   Given a rooted tree(node 1 is the root) with n nodes. The ithnode has a positive value vi…
Area of Mushroom Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2390    Accepted Submission(s): 578 Problem Description Teacher Mai has a kingdom with the infinite area. He has n students guard…