随笔分类 - C++STL
摘要:Problem 2088 最长队名 Problem Description Jack所在的班级决定组团报名参加FZU校赛。为了体现班级的团结和睦,班长决定用班级所有人的名字连起来组成一个史上最长最醒目的队名。 因为听说在分数相同的情况下,队名字典序小的会排在更前面,班长还希望连成的史上最长队名拥有最
阅读全文
摘要:As Easy As A+B Problem Description These days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do s
阅读全文
摘要:题目链接 Problem Description Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If somethin
阅读全文
摘要:题目链接 Problem Description Let S = s1 s2 … s2n be a well-formed string of parentheses. S can be encoded in two different ways: By an integer sequence P
阅读全文
摘要:题目链接 Problem Description 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Input 测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要
阅读全文
摘要:Time Limit: 1 Sec Memory Limit: 128 MB Description 有一个长度为n的字符串(只包含小写字母),操作m次,每次操作交换两个字母,输出最终字符串。 Input 多组输入,每组第一行为n,m表示字符串长度和操作数,1<n,m<=100000第二行为长度n的
阅读全文
摘要:Time Limit: 1 Sec Memory Limit: 128 MB Description 你的任务是编写一个程序实现简单的字符宽度编码方法。规则如下:将任何2~9个相同字符的序列编码成2个字符:第1个字符是序列的长度,用数字字符2~9表示,第2个字符为这一串相同字符序列中的字符。超过9个
阅读全文
摘要:题目链接 题解:将每个单词倒置,可以用char数组,然后用空格分隔,这里用的是string和stringstream。 #include <cstdio> #include <iostream> #include <string> #include <sstream> #include <cstri
阅读全文

浙公网安备 33010602011771号