Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-generated passwords (like xvtpzyo), but users have a…
Easier Done Than Said?                                                                     Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Problem Description Password security is a tricky thing. Users prefer simpl…
Easier Done Than Said? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16543    Accepted Submission(s): 7846 Problem Description Password security is a tricky thing. Users prefer simple password…
Easier Done Than Said? Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-generated passwords (like xvtp…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1039 Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-g…
水水的 #include <iostream> #include <cstring> using namespace std; ]; bool flag; int vol,v2,con; int main() { while(cin>>s) { if(!strcmp(s,"end")) break; flag=; v2=vol=con=; ;s[i]!='\0';i++) { ]&&(s[i]!='e'&&s[i]!=…
HDOJ(HDU).1412 {A} + {B} (STL SET) 点我挑战题目 题意分析 大水题,会了set直接用set即可. 利用的是set的互异性(同一元素有且仅有一项). #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <set> #define nmax 20005 using namespace std; s…
HDOJ(HDU).1754 I Hate It (ST 单点替换 区间最大值) 点我挑战题目 题意分析 从题目中可以看出是大数据的输入,和大量询问.基本操作有: 1.Q(i,j)代表求区间max(a[k]) k∈[i,j]: 2.U(i,j)代表a[i] = j; 对于询问U,用单点替换的操作维护线段树.对于询问Q,那么除了叶子节点,其他的节点应该保存的是左子树和右子树的最大值,因此pushup函数应该是对最大值的一个维护,query的时候找出的应该是最大值,故改为ans = max(--)…
HDOJ(HDU).1166 敌兵布阵 (ST 单点更新 区间求和) 点我挑战题目 题意分析 根据数据范围和询问次数的规模,应该不难看出是个数据结构题目,题目比较裸.题中包括以下命令: 1.Add(i,j)表示 a[i]+=j; 2.Sub(i,j)表示 a[i]-=j; 3.Query(i,j)表示 Σ(a[i],a[j]). Add操作和Sub操作分别是单点更新,Query是区间求和.题目比较裸,但是在写ST模板的时候还是不能一次写对,出的错记录如下: 1.由于对模板的不熟悉,rt打成rn导…
HDOJ(HDU).2844 Coins (DP 多重背包+二进制优化) 题意分析 先把每种硬币按照二进制拆分好,然后做01背包即可.需要注意的是本题只需要求解可以凑出几种金钱的价格,而不需要输出种数.因此用0表示不可以,1表示可以.最后对dp数组扫描一遍即可. 代码总览 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define nmax 100…