自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

转载 很快的快速读入

发福利发福利。读入速度很快,fread才是坠吼的!这里给出了读入非负数(需要负数的话加个对'-'的判断),读入字符串。读入浮点数怎么办呢?读入字符串atof一下即可。namespace IO{ char buf[1<<18], *fs, *ft; inline char readc(){ return (fs==ft&&(ft=(fs=buf)+fread(

2017-04-29 19:50:39 681

原创 zoj 3635 Cinema in Akiba 二分+树状数组

题目:Cinema in AkibaTime Limit: 3 Seconds      Memory Limit: 65536 KBCinema in Akiba (CIA) is a small but very popular cinema in Akihabara. Every night the cinema is full of people. The la

2017-04-21 22:47:00 271

原创 string insert()函数的用法

#include #include int main (){ std::string str="to be question"; std::string str2="the "; std::string str3="or not to be"; std::string::iterator it; // used in the same order as described

2017-04-14 20:58:04 20166

原创 小知识盲点 for myself(持续更新中)

pow()函数返回值是double型,注意加个(int)double pow(double x, double y)

2017-04-13 20:05:49 215

原创 hdu 2072 单词数 set+按字符处理

题目:单词数Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 51648    Accepted Submission(s): 12708Problem Descriptionlily的好朋友xia

2017-04-12 22:58:37 232

原创 关于find()函数及npos

npos类型: static const size_t npos = -1; find()类型声明:string (1)size_t find (const string& str, size_t pos = 0) const;c-string (2)size_t find (const char* s, size_t

2017-04-05 02:59:26 693

转载 C++中的C_str()函数简单用法

语法: const char *c_str();c_str()函数返回一个指向正规C字符串的指针常量, 内容与本string串相同. 这是为了与c语言兼容,在c语言中没有string类型,故必须通过string类对象的成员函数c_str()把string 对象转换成c中的字符串样式。注意:一定要使用strcpy()函数 等来操作方法c_str()返回的指针 比如:最好不要这样: cha

2017-04-05 01:52:53 330

原创 为什么一般用vector<string> 而非 vector<char*>

因为方便。Achar*is a pointer, which may or may not point to valid string data.Astd::stringis a string class, encapsulating all the required data that makes up a string, along with allocat

2017-04-05 01:35:58 4683 1

转载 STL中的set容器的一点总结

原文地址:http://www.cnblogs.com/BeyondAnyTime/archive/2012/08/13/2636375.html1.关于setC++ STL 之所以得到广泛的赞誉,也被很多人使用,不只是提供了像vector, string, list等方便的容器,更重要的是STL封装了许多复杂的数据结构算法和大量常用数据结构操作。vector封装数组,li

2017-04-05 01:06:03 453

转载 C语言函数sscanf()的用法

原文链接:http://www.cnblogs.com/lyq105/archive/2009/11/28/1612677.html注:下面有些代码中含有中文字符,直接编译会报 stray'\241' sscanf() - 从一个字符串中读进与指定格式相符的数据.  函数原型:  int sscanf( string str, string fmt, mix

2017-04-04 17:14:37 606

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除