码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
URAL 1244. Gentlemen (DP)
题目链接题意 :给出一幅不完全的纸牌.算出哪些牌丢失了.思路 : 算是背包一个吧。if f[j]>0 f[j+a[i]] += f[j];然后在记录一下路径。 1 //1244 2 #include 3 #include 4 #include 5 6 using namespace std ...
分类:其他好文   时间:2014-05-21 20:19:58    阅读次数:339
编程之美-数组中最长递增子序列(包括输出)
#include #define N 8using namespace std;int main(){ int a[N]={1,-1,2,-3,4,-5,6,-7}; int lis[N]; int result[N];//结果 for(int i=0;i a[j] && lis[i] =0;t--...
分类:其他好文   时间:2014-05-21 19:51:31    阅读次数:351
HDU 1358
http://acm.hdu.edu.cn/showproblem.php?pid=1358求某个前缀的周期,用Next求循环节的题目#include #include #include #include using namespace std ;char B[1000005] ;int Next[...
分类:其他好文   时间:2014-05-21 19:23:01    阅读次数:241
Winsock 示例
#include "stdafx.h"#include #include #pragma comment(lib,"ws2_32.lib")using namespace std;int main(int argc, char* argv[]){ WSADATA wsaData; int...
分类:Windows程序   时间:2014-05-21 19:01:01    阅读次数:476
hdu 1565
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 9 #define maxx 1<<2110 using namespace std;11 12 int mat[22][22],n,dp.....
分类:其他好文   时间:2014-05-21 19:00:25    阅读次数:197
C++宽窄字符串转换
首先,贴出我给出的解决方案:http://files.cnblogs.com/xuejianhui/utils.rar再则,贴出网上最常见的例子:#include std::string ws2s(const std::wstring& ws){ std::string curLocale =...
分类:编程语言   时间:2014-05-21 18:46:28    阅读次数:400
c++学习笔记2(c++简单程序)
c++的简单程序练习一:#include int main(){std::cout>x;std::cout内的文件读入。头文件iostream(输入输出流)标准库,包含了众多的成员函数,库中每个函数都有其自身的作用。声明了一个main函数,main函数的意思是"主函数",每个c++程序都有一个mai...
分类:编程语言   时间:2014-05-21 17:22:09    阅读次数:308
使用构造函数初始化成员数组
#include using namespace std; class Box//盒子类 { public: //定义一个构造函数用于初始化对象数组 Box(int h, int w, int l); int volume();//计算盒子的体积 private: int height;//盒子的高 int width;//盒子的宽 int length;//盒子的长 }; ...
分类:其他好文   时间:2014-05-21 17:09:16    阅读次数:212
poj1195 mobile phones 【二维树状数组】
一次AC 二维树状数组,有模版很好办 注意二维树状数组这个下标是[1][1]的 #include #include #include #include #include #include using namespace std; const int Max = 1030; int row, col, ar[Max][Max]; // 二维的其实下标为[1][1],这个要记得。 ...
分类:其他好文   时间:2014-05-21 16:23:34    阅读次数:271
13周 项目1 点,圆的关系
#include #include using namespace std; class Point { public: Point(double a,double b):x(a),y(b) {} double getx() { return x; } double gety() { ...
分类:其他好文   时间:2014-05-21 14:44:07    阅读次数:281
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!