摘要: 题意 让你统计字符串最多的那个串,并输出 分析 直接用map统计,不断更新最大值即可 代码 include include include include using namespace std; int main(){ string s,ans; int n; //freopen("in.txt" 阅读全文
posted @ 2018-10-17 13:17 ChunhaoMo 阅读(79) 评论(0) 推荐(0)
摘要: 链接 [http://acm.hdu.edu.cn/showproblem.php?pid=1161] 题意 把字符串中大写字母变为小写 。 分析 主要是含有空格的字符串如何读入,用getline(cin,s); 代码 include include using namespace std; def 阅读全文
posted @ 2018-10-17 12:56 ChunhaoMo 阅读(98) 评论(0) 推荐(0)
摘要: 题意 略 分析 因为字典序最小,所以从后面的列递推,每次对上一列的三个方向的行排序就能确保,数字之和最小DP就完事了 代码 因为有个地方数组名next和里面本身的某个东西冲突了,所以编译错了,后来改成nt就过了 include include include using namespace std; 阅读全文
posted @ 2018-10-17 11:30 ChunhaoMo 阅读(109) 评论(0) 推荐(0)
摘要: 链接 [http://www.51nod.com/onlineJudge/questionCode.html problemId=1133&noticeId=468024] 题意 X轴上有N条线段,每条线段有1个起点S和终点E。最多能够选出多少条互不重叠的线段。(注:起点或终点重叠,不算重叠)。 例 阅读全文
posted @ 2018-10-17 11:09 ChunhaoMo 阅读(283) 评论(0) 推荐(0)