码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
C++中的cin、getline()、get()。
cin是C++中常用的一种输入方式,通常与>>运算符结合使用,解释为从输入流中抽取出字符存入到想要保存的变量中。eg:#include using namespace std;int main(){ char name[20]; cout > name; cout > name表示...
分类:编程语言   时间:2015-06-06 11:45:41    阅读次数:193
BZOJ 1639: [Usaco2007 Mar]Monthly Expense 月度开支( 二分答案 )
直接二分答案然后判断.-----------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int ...
分类:其他好文   时间:2015-06-06 11:44:57    阅读次数:112
C++图像识别转灰度
1?#include?<stdafx.h> ??2?#include?<stdio.h> ??3?#include?<string.h> ??4?#include?<math.h> ??5?#include?<windows.h> ??6?using?namespace?std; ??7? ??8? ??9?//将位图...
分类:编程语言   时间:2015-06-06 10:41:06    阅读次数:175
Cocos2d-x3.2 Grid3D网格动作
Cocos2d-x3.2 Grid3D网格动作转自 http://my.oschina.net/Jacedy/blog/301575?p=1 //GameScene.h#include"cocos2d.h"classGameScene:publiccocos2d::Layer{public:stat...
分类:其他好文   时间:2015-06-06 10:33:48    阅读次数:156
Easy51RTOS入门级初略分析
main.c#include "reg51.h"#include "os_cfg.h"#define TASK_DELAY0 TIME_PER_SEC/1 //任务执行频度为1Hz#define TASK_DELAY1 TIME_PER_SEC/2 //任务执行频度为2Hz#define TASK_...
分类:其他好文   时间:2015-06-06 10:33:04    阅读次数:281
折半查找
#include#includetypedef int Status;Status binSearch(int *p,int key,int low,int high) { int middle; while(lowkey) { high=middle-1; } else if(p[mi...
分类:其他好文   时间:2015-06-06 10:21:58    阅读次数:99
hdu 4419 矩形面积并
#include #include #include #include #include #include using namespace std; typedef __int64 LL; const int mmax = 20010; mapq; struct Rect { LL x1,x2; LL y1,y2; char Col[2]; void read()...
分类:其他好文   时间:2015-06-06 09:18:50    阅读次数:103
Valid Parentheses
为了在运行中避免可能出现的危险,即当string emuStack为空,emuStack.begin()和emuStack.end()是什么。采取的策略是先将emuStack重置为非空,再进行其他操作,这样就永远不可能碰到底部。 #include #include using namespace std; class Solution { public: bool isValid(st...
分类:其他好文   时间:2015-06-06 09:18:14    阅读次数:108
【JSOI 2008】【BZOJ 1016】最小生成数计数
这题题目中有一个很显眼的提示,每种权值的边不会超过10条,这提示我们可以采用些暴力方法。 首先在每个最小生成树中有两个结论: 1、每种权值的边数相等。 2、每种权值所选边构建后图的联通形态相同。 1比较好理解,若1不成立,则最小生成树总权值不固定。 2可以通过Kruskal算法流程来理解。 code:#include #include #include...
分类:Web程序   时间:2015-06-06 09:16:25    阅读次数:214
HDU ACM 1031 Design T-Shirt 水题
分析:给你n个人M件衣服, 选出前K件衣服评价最大值,注意要输出的是编号,编号从大到小。两次排序即可。 #include #include using namespace std; struct node { double m; int id; }; bool cmp(const node& a,const node& b) { if(a.m!=b.m) return a.m>b....
分类:其他好文   时间:2015-06-06 09:16:04    阅读次数:95
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!