本月博客排行
-
第1名
wy_19921005 -
第2名
mft8899 -
第3名
benladeng5225 - Anmin
- wddpwzzhao123
年度博客排行
-
第1名
龙儿筝 -
第2名
宏天软件 -
第3名
benladeng5225 - wy_19921005
- vipbooks
- kaizi1992
- e_e
- tanling8334
- sam123456gz
- 青否云后端云
- arpenker
- zysnba
- fantaxy025025
- xiangjie88
- wallimn
- lemonhandsome
- jh108020
- ganxueyun
- Xeden
- xyuma
- wangchen.ily
- zhanjia
- johnsmith9th
- zxq_2017
- forestqqqq
- jbosscn
- daizj
- xpenxpen
- 喧嚣求静
- kingwell.leng
- lchb139128
- kristy_yy
- jveqi
- javashop
- lzyfn123
- sunj
- yeluowuhen
- ajinn
- lerf
- silverend
- chenqisdfx
- xiaoxinye
- flashsing123
- lyndon.lin
- bosschen
- zhangjijun
- sunnylocus
- lyj86
- paulwong
- sgqt
最新文章列表
STL中容器使用自定义排序时出现assert
使用STL容器时(此次我遇到的问题是使用STL的优先级队列priority_queue时出现的),如果要放入的内容非基本类型(自定义对象或结构体)时,一般需要使用自定义的排序方法,我的自定义排序是这样写的:
struct cmp
{
bool operator()(const Edge* e1,const Edge* e2)
{
if(e1-& ...
hdu 2072 找单词 很不错的一道题 模拟 and STL 2种做法
单词数
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 16105 Accepted Submission(s): 4187
Problem Description
lily的好朋友xiaoou333 ...
ZOJ 3633 Alice's present
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3633
这个应该算是ZOJ的水题了吧!只可惜比赛的时候虽然想到了用STL里的map,但是因为对map不熟悉所以没用map搞,于是比赛的时候没有A掉这道题。有时间要学习整理一下STL一些常用的东西了。
题意:Alice将她的娃娃排成了一排,她要选一段(连续的)娃娃作为礼物 ...
STL string 的各种功能剖析 以及char字符串与string串的互相转换
string的好处 :
不用担心内存是否足够、字符串长度等等,而且作为一个类出现,他集成的操作函数足以完成我们大多数情况下(甚至是100%)的需要。我们可以用 = 进行赋值操作,==
进行比较,+ 做串联(是不是很简单?)。我们尽可以把它看成是C++的基本数据类型。
为了在我们的程序中使用string类型,我们必须包含头文件 <string>。如下: #include & ...
hdu 1113 暴力以及map string的用法 这个比较帅重要
Word Amalgamation
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1646 Accepted Submission(s): 758
Problem Description
In millio ...
hdu 1113 暴力以及map string的用法 这个比较帅重要
Word Amalgamation
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1646 Accepted Submission(s): 758
Problem Description
In millio ...
hdu 1029 map做法
Ignatius and the Princess IV
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32767 K (Java/Others) Total Submission(s): 9654 Accepted Submission(s): 3785
Problem Description
...
hdu 1029 map做法
Ignatius and the Princess IV
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32767 K (Java/Others) Total Submission(s): 9654 Accepted Submission(s): 3785
Problem Description
...
hdu 1263 水果 map的双重用法 超级帅呆 重要哦
水果
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1553 Accepted Submission(s): 616
Problem Description
夏天来了~~好开心啊,呵呵,好多好多水果~~
...
ZOJ Monthly, August 2012 - A Alice's present MAP函数
Alice's present
Time Limit: 5 Seconds
Memory Limit: 65536 KB
As a doll master, Alice owns a wide range of dolls, and each of them has a number tip on it's back, the tip can be ...
ZOJ Monthly, August 2012 - A Alice's present MAP函数
Alice's present
Time Limit: 5 Seconds
Memory Limit: 65536 KB
As a doll master, Alice owns a wide range of dolls, and each of them has a number tip on it's back, the tip can be ...
POJ 1731 Orders STL 中string的应用
来源:http://poj.org/problem?id=1731
题意:给一个字符串,按照该字符串的升序输出全排列。
思路:直接用next_permutation水过。
代码:
#include <iostream>
#include <cstdio>
#include <string.h>
#include <algorithm> ...
POJ 1731 Orders STL 中string的应用
来源:http://poj.org/problem?id=1731
题意:给一个字符串,按照该字符串的升序输出全排列。
思路:直接用next_permutation水过。
代码:
#include <iostream>
#include <cstdio>
#include <string.h>
#include <algorithm> ...