码迷,mamicode.com
首页 >  
搜索关键字:visaul stdio    ( 10042个结果
gcc以及共享库
#include<stdio.h> #include<math.h> intmain() { doublex=pow(2.0,3.0); printf("Thecubeof2.0=%f\n",x); return0; }
分类:其他好文   时间:2014-11-04 07:01:06    阅读次数:141
Win32窗口以及C++日志
winshow//ShowWin.h:interfacefortheCShowWinclass. // ////////////////////////////////////////////////////////////////////// #include<windows.h> #include<dos.h> #include<string.h> #include<stdio.h> #include<stdlib.h> #defineDISPL..
分类:编程语言   时间:2014-11-04 06:55:31    阅读次数:271
HDU 3874 离线线段树
统计区间内所有数字和,对于重复出现的只统计一次 线段树的离线算法  按结束坐标排序,然后扫一遍,遇到重复的,就把之前插入线段树的给删掉 #include "stdio.h" #include "string.h" #include "algorithm" using namespace std; struct node { int l,r; __int64 sum; ...
分类:其他好文   时间:2014-11-03 17:51:52    阅读次数:202
HDU 线段树
给出N个节点,M次操作,和p 每次操作 对l-r区间的每个节点+c,若节点值>=p,则加2*c; 结点存当前区间伤害最小值,最大值,以及lazy操作。更新到如果最小值大于等于P,或者最大值小于P为止。 #include "stdio.h" #include "string.h" struct node { int l,r,Min,Max,lazy; } data[8...
分类:其他好文   时间:2014-11-03 17:45:47    阅读次数:242
c语言结构体
为什么使用结构体:一些不同数据类型的集合例一:结构体的使用#include "stdio.h"#include "string.h"typedef struct { char name[20]; int height; float weight; long schols...
分类:编程语言   时间:2014-11-03 11:24:39    阅读次数:164
队列 句句分析 精辟解释 有图
顺序栈,即栈的顺序存储结构是利用一组地址连续的存储单元依次存放自栈底到栈顶的数据元素,同时附设指针top指示栈项元素在顺序栈中的位置。 #include "stdio.h"//包含头文件,就是编译时候把stdio.h中的内容替换到这个位置。 struct stack//定义结构体stack { int length;//定义整型变量length struct data *top;//...
分类:其他好文   时间:2014-11-02 22:34:32    阅读次数:220
linux c/c++ IP字符串转换成可比较大小的数字
由www.169it.com搜集整理IP字符串转换成可比较大小的数字,具体代码如下所示:1234567891011121314#include "stdio.h"#include "arpa/inet.h"#includeusingnamespacestd;// linux c/c++ IP字符串转...
分类:编程语言   时间:2014-11-02 22:12:48    阅读次数:200
HDU 5091 线段树扫描线
给出N个点,和一个w*h的矩形 给出N个点的坐标,求该矩形最多可以覆盖多少个点 对每个点point(x,y)右边生成对应的点(x+w,y)值为-1; 纵向建立线段树,从左到右扫描线扫一遍,遇到点则用该点的权值更新区间(y,y+h) #include "stdio.h" #include "string.h" #include "algorithm" using namespace ...
分类:其他好文   时间:2014-11-02 19:43:33    阅读次数:222
HDU 5094 状压BFS
给出n*m矩阵 给出k个障碍,两坐标之间存在墙或门,门最多10种, 给出s个钥匙位置及编号,相应的钥匙开相应的门 状压BFS即可,注意有可能同一个位置有多个门或者多个钥匙 #include "stdio.h" #include "string.h" #include "queue" using namespace std; int b[]={1,2,4,8,16,32,64,12...
分类:其他好文   时间:2014-11-02 19:43:22    阅读次数:123
HDU 5092 DP
DP水题 求从上到下走完,使所取得权值最小,并输出路径,若有多个满足,则输出靠右的 #include "stdio.h" #include "string.h" int inf=0x3f3f3f3f; struct node { int x,y; }dp[110][110]; int main() { int Case,ii,i,j,n,m,ans; int...
分类:其他好文   时间:2014-11-02 19:42:33    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!