会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Xkfx's Blog
博客园
首页
新随笔
订阅
管理
上一页
1
···
17
18
19
20
21
22
23
24
25
···
74
下一页
2020年5月1日
一个FLAG #21# 复合词(Compound Words,UVa 10391)
摘要: 题 习题5-4 复合词(Compound Words,UVa 10391)。完整题目见参考[1] #include <iostream> #include <cstring> #include <string> #include <set> using namespace std; set<stri
阅读全文
posted @ 2020-05-01 22:49 xkfx
阅读(247)
评论(0)
推荐(0)
2020年4月27日
一个FLAG #20# Unix is 命令(Unix is,UVA 400)
摘要: 题 例题5-8 Unix is 命令(Unix is,UVA 400)。完整题目见参考[1] #include <iostream> #include <string> #include <algorithm> using namespace std; const int maxcol = 60;
阅读全文
posted @ 2020-04-27 16:58 xkfx
阅读(193)
评论(0)
推荐(0)
2020年4月23日
一个FLAG #19# 引入this
摘要: 正文 点运算符 . 例如 item.isbn() 只用于类类型对象。左侧运算对象必须是一个类类型的对象。右侧必须是该类型对象的一个成员名。运算结果是右侧对象指定的成员。 箭头运算符号 -> 例如 (*it).empty(); 是先对it解引用,然后解引用的的结果再执行点运算符。 箭头运算符是对上述表
阅读全文
posted @ 2020-04-23 22:37 xkfx
阅读(143)
评论(0)
推荐(0)
2020年4月21日
一个FLAG #18# 再谈结构体
摘要: 例子 书上的原始代码: #include <iostream> using namespace std; struct Point { int x, y; Point(int x = 0, int y = 0): x(x), y(y) { // x(x), y(y) 等价于 // this->x =
阅读全文
posted @ 2020-04-21 23:07 xkfx
阅读(207)
评论(0)
推荐(0)
2020年4月15日
一个FLAG #17# 测试STL
摘要: 例子 #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <cassert> using namespace std; void fill_random_int(vector<int>
阅读全文
posted @ 2020-04-15 09:52 xkfx
阅读(147)
评论(0)
推荐(0)
2020年4月14日
一个FLAG #16# 优先队列
摘要: 例子 #include <iostream> #include <queue> #include <vector> using namespace std; struct cmp { bool operator() (const int a, const int b) const { return
阅读全文
posted @ 2020-04-14 10:08 xkfx
阅读(149)
评论(0)
推荐(0)
2020年4月13日
一个FLAG #15# 团队队列
摘要: 题 例题5-6 团队队列(Team Queue,UVA - 540)。完整题目见参考[1] #include <cstdio> #include <queue> #include <map> using namespace std; const int MAXT = 1000 + 10; int m
阅读全文
posted @ 2020-04-13 11:06 xkfx
阅读(199)
评论(0)
推荐(0)
2020年4月12日
一个FLAG #14# The SetStack Computer
摘要: 题 集合栈计算机,完整题目见参考[1] 书上的原始代码如下: #include <iostream> #include <vector> #include <map> #include <set> #include <string> #include <stack> #include <algori
阅读全文
posted @ 2020-04-12 10:00 xkfx
阅读(134)
评论(0)
推荐(0)
2020年4月11日
一个FLAG #13# V字型数列
摘要: 题 完整题目见参考[1]。 #include <iostream> #include <cstdio> using namespace std; int main() { int T, n, num; // 数据组数,商品种数,种商品的数量 float price, sum; // 某种商品的价格,
阅读全文
posted @ 2020-04-11 10:00 xkfx
阅读(267)
评论(0)
推荐(0)
2020年4月10日
一个FLAG #12# 反片语
摘要: 题 例题5-3 反片语(Ananagrams, UVa 156)完整题目见参考[1] 思路:首先把未标准化的单词逐个存到一个vector中,在存的过程中,将标准化后的单词,例如RIDE标准化后是deir,通过map存储并统计其出现的次数。然后根据map中所存储的信息进一步从第一个vector中筛选出
阅读全文
posted @ 2020-04-10 10:42 xkfx
阅读(206)
评论(0)
推荐(0)
上一页
1
···
17
18
19
20
21
22
23
24
25
···
74
下一页
公告