G - Kinds of Fuwas Time Limit:2000MS    Memory Limit:65536KB    64bit IO Format:%lld & %llu SubmitStatusPracticeZOJ 2975 Description In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China as well a…
K - Kinds of Fuwas Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Description In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China as well as becoming a festival for p…
Kinds of Fuwas Time Limit: 2 Seconds      Memory Limit: 65536 KB In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China as well as becoming a festival for people all over the world. The official ma…
MS    Memory Limit:65536KB    64bit IO Format:%lld & %llu SubmitStatusid=14946">Practiceid=14946">ZOJ 2976 Description Wildleopard had fallen in love with his girlfriend for 20 years. He wanted to end the long match for their love and…
Phone CellTime Limit:10000MS    Memory Limit:32768KB    64bit IO Format:%lld & %llu SubmitStatusPracticeZOJ 2978 Description Nowadays, everyone has a cellphone, or even two or three. You probably know where their name comes from. Do you. Cellphones c…
A. Encoding Problem Description Given a string containing only 'A' - 'Z', we could encode it using the following method: Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub…
day1: 考微观经济学去了…… day2: 一开始就看了看一道题目最短的B题,拍了半小时交了上去wa了 感觉自己一定是自己想错了,于是去拍大家都过的A题,十分钟拍完交上去就A了 然后B题写了一发暴力对跑,感觉跑出来的数据都是对的,然后看看了题目,看是不是自己读题读错了 WTF!输出居然是Case %d,而我写的是Case #%d = =!,改了改输出格式,交上去就AC了,浪费了我好久时间 然后就去做J题了,J题傻逼题,结果卡全场,赛后一看,long long 改成 unsigned long…
快速全排列的函数 头文件<algorithm> next_permutation(a,a+n) ---------------------------------------------------------------------------------------------------------------------------------------------------------1 - string 与 字符串 find 搜寻失败会返回 string::npos 的值 st…
这又是个状压dp (大型自闭现场) 题目大意: 在N*N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案.国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个格子. 输入格式: 只有一行,包含两个数N,K . 输出格式: 所得的方案数. 算法分析: 1.显然这又是一道状压的题 2.显然一样是用f数组表示方案数 But 这个f数组需要开三维 为什么呢 我们首先分析一下f的转移情况 f的状态与什么有关呢 首先我们很容易知道我们的dp是从上往下一点点递推实现的 而这个…
题目大意: 如何把一个正整数N(N长度<20)划分为M(M>=1)个部分,使这M个部分的乘积最大.N.M从键盘输入,输出最大值及一种划分方式. 输入格式: 第一行一个正整数T(T<=10000),表示有T组数据. 接下来T行每行两个正整数N,M. 输出格式 对于每组数据 第一行输出最大值. 第二行输出划分方案,将N按顺序分成M个数输出,两个数之间用空格格开. 算法分析: 第一问求dp值就是简单的dp 具体实现可参见 暑假集训day1 水题 乘法最大 1.做第一问的时候注意这个题给出的M并…