码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
OJ 注意点及知识点总结
1.头文件#include //vector容器#include //map容器#include //sort() 函数需要加2.宏定义#define OK 0#defien ERR 1或者定义成其他。3.字符串问题入参有字符指针,一定要检查是不是NULL传入的Output指针,如果没...
分类:其他好文   时间:2015-07-04 19:46:07    阅读次数:167
字符串反转
写出一个程序,接受一个字符串,然后输出该字符串反转后的字符串。例如: 输入:abc 输出:cba 完整代码: #include #include #include "oj.h" /* 功能: 输入: 输出: 返回:success :0,fail:-1 */ int ProcessString(char * strInput,char...
分类:其他好文   时间:2015-07-04 18:30:28    阅读次数:118
poj 2019 二维rmq *
题目大意:给出一个N*N矩形,每个格子上有一个价值。询问一个b*b的矩形在左上角的位置(x,y),(x+b-1,y+b-1)这一部分的最大值-最小值是多少。模板题 1 #include 2 #include 3 #include 4 #include 5 using namespace st...
分类:其他好文   时间:2015-07-04 18:04:55    阅读次数:86
C++atoi与atof
#include using namespace std; static int sflags = 0; //atof的函数实现。 bool Isnum(char ch) { return (ch - '0') >= 0 || (ch - '0') <= 9; } float Getnum(char *s,int flags) { float count = 0...
分类:编程语言   时间:2015-07-04 16:49:22    阅读次数:123
【c语言】模拟实现库函数的atof函数
// 模拟实现库函数的atof函数 #include #include #include #include double my_atof(char const *p) { double ret = 0; int flag = 1; int count = 0; assert(p != NULL); while (isspace(*p)) { p++; } whil...
分类:编程语言   时间:2015-07-04 16:47:04    阅读次数:138
creat函数和open函数的区别
顾名思义,creat创建新文件,open打开文件。但,open也可以起到创建新文件的作用。 #include?<fcntl.h> int?creat(const?char?*pathname,?mode_t?mode); //Returns:?file?descriptor?opened?for?write...
分类:其他好文   时间:2015-07-04 15:39:50    阅读次数:411
【c语言】 模拟实现库函数的atoi函数
// 模拟实现库函数的atoi函数 #include #include #include #include int my_atoi(char const *p) { int ret = 0; int a = 0; int flag = 1; assert(p != NULL); while (isspace(*p)) { p++; } while (*p) { ...
分类:编程语言   时间:2015-07-04 15:31:00    阅读次数:170
BZOJ3461 : Jry的时间表
fl[i]表示[1,i]操作一次,且在[j+1,i]处操作的最大值1:把[j+1,i]改为b[i]: max(sum[j]+b[i]*(i-j))=b[i]*i+max(-j*b[i]+sum[j])(0#include#define N 500010typedef long long ll;int...
分类:其他好文   时间:2015-07-04 15:28:24    阅读次数:237
linux下自实现简易tail命令
/* ????浏览单个文件,按行或者按字节 ????格式:?tail?filename?c/n?num,目前不支持其他格式 */ #include?<stdio.h> #include?<stdlib.h> #include?<fcntl.h> #include?<unistd.h> /* ????错...
分类:系统相关   时间:2015-07-04 14:12:08    阅读次数:204
multiset容器的应用
与set集合容器一样,multiset多重集合容器也使用红黑树组织元素数据,只是multiset容器允许将重复的元素健值插入,而set容器则不允许。 set容器所使用的C++标准头文件set,其实也是multiset容器的头文件,因为这个set头文件也包含multiset所需的红黑树和自身实现文件,只要用宏语句“#include”包含进来,就可对multiset容器的应用代码进行编译。 创建m...
分类:其他好文   时间:2015-07-04 14:00:10    阅读次数:110
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!