码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
Uva 563 网络流
题目链接:点击打开链接 题意:给定s*a的方格点,有b个坐标是有且仅有一个人的。 每个点只能被经过一次 能不能让所有人都移动到矩阵边缘。 拆点一下,建图还是挺明显的。。 太卡了提交半天没结果,贴一下代码改天再搞好了。。 #include #include #include #include #include using namespace std; #define ll...
分类:其他好文   时间:2014-06-05 04:36:13    阅读次数:238
十四周 项目 1 动物这样叫
#include #include using namespace std; class Animal { public: virtual void cry() { cout<<"不知哪种动物,让我如何学叫?"<<endl; } }; class Mouse:public Animal { public: Mous...
分类:其他好文   时间:2014-06-05 04:22:09    阅读次数:233
POJ 2155 Matrix 二维树状数组
题目来源:POJ 2155 Matrix 题意:开始矩阵都是0 2种操作 把某个子矩阵翻转 0变1 1变0 查询x y 是0还是1 思路:树状数组 记录翻转次数就行 奇数次是1 偶数次是0  这题是区间更新 点查询   向上求和 向下更新 而且是二维的 #include #include using namespace std; const int maxn = 1300; i...
分类:其他好文   时间:2014-06-05 01:59:00    阅读次数:287
C++学习笔记17,构造函数体内初始化数据成员与构造函数初始化器的区别(一)
在构造体内初始化数据成员是最常见的方法。 例如: #include using namespace std; class A { private: int i; string s; public: A(int ii,string ss){ //在构造函数体内初始化数据成员 i=ii; s=ss; cout<<"ctor:i="<<i<<",s="<<s<<endl; ...
分类:编程语言   时间:2014-06-05 01:00:02    阅读次数:219
c++ primer plus(第6版)中文版 第十三章编程练习答案
第十三章编程练习答案 13.1根据Cd基类,完成派生出一个Classic类,并测试 //13.1根据Cd基类,完成派生出一个Classic类,并测试 #include #include using namespace std; // base class class Cd { char performers[50]; char label[20]; int selections; ...
分类:编程语言   时间:2014-06-04 23:45:54    阅读次数:490
POJ 3268 Silver Cow Party dijkstra单源最短路
裸dijkstra 思路:以x为源点,求到其他点的最短路,之后把邻接矩阵转置,再求一次x源 点的最短路,这样就一次是来的,一次是走的,相加迭代最大值即可 代码: /* poj 3268 8108K 47MS */ #include #include #define MAXN 1005 #define MAX_INT 2147483647 using namespace s...
分类:其他好文   时间:2014-06-04 23:32:57    阅读次数:303
POJ - 1118 Lining Up
题意:求一条线上最多几个点 思路:枚举一个点,然后求出过这个点的直线的斜率来求最大值 #include #include #include #include #include #include using namespace std; const int MAXN = 710; const int INF = 1e7; int arr[MAXN][2],n; float brr[...
分类:其他好文   时间:2014-06-04 22:29:53    阅读次数:333
vs2008内存泄露检测得到完美解决
YES,it's so easy,what we need to do is just include ,then the information of memory leaking will be shown on the screen....
分类:其他好文   时间:2014-05-31 21:14:52    阅读次数:334
【USACO 1.2.2】方块转换
【问题描述】一块N x N(1 2 #include 3 #include 4 #include 5 #include 6 #include 7 const int maxn=15; 8 const int INF=0x7fffffff; 9 using namespace...
分类:其他好文   时间:2014-05-31 19:38:46    阅读次数:343
北京邀请赛 H. Happy Reversal
题意:给你一些二进制的数,然后你可以选择按位取反,也可以不变,你只能选择一种,然后让你找出最大和最小,求最大的差值 思路:将取反与不取反都算出来,然后大的放一边,小的放一边,排序后判断#include #include #include #include #define ll long long using namespace std; const int MAXN = 100010; ...
分类:移动开发   时间:2014-05-31 17:44:07    阅读次数:321
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!