码迷,mamicode.com
首页 >  
搜索关键字:es6 let const    ( 43838个结果
hust 1463 - 第二届“华为杯”初赛题目H
题目描述有m个盒子,第i个盒子的长尾hi,宽为wi。如果两个盒子i,j满足hi#include#includeusing namespace std;const int maxn=20001;struct node{ int x,y;}box[maxn];int a[maxn];bool cm...
分类:其他好文   时间:2014-05-20 02:11:24    阅读次数:251
字符串系列函数(不断跟新)
1.sprintf,sprintf_ssprintf(char* buffer, const char* format, [argument]);vs下需要加上_CRT_SECURE_NO_WARNINGS#include using namespace std;int main(){ cha...
分类:其他好文   时间:2014-05-20 01:40:00    阅读次数:292
c++ 读文本文件
1. std::ifstream t("example.txt"); std::string str((std::istreambuf_iterator(t)), std::istreambuf_iterator());2void readfile(const std::stri...
分类:编程语言   时间:2014-05-19 21:27:01    阅读次数:321
从C到C++ (1)
从C到C++一、 bool类型 bool取值false和true,是0和1的区别; false可以代表0,但true有很多种,并非只有1。二、 const限定符常量在定义后就不能修改,所以定义时必须初始化。在一个文件全局作用域中定义非const变量,在另外的文件中做extern声明,就可以使用这.....
分类:编程语言   时间:2014-05-19 11:02:50    阅读次数:271
POJ 2828 Buy Tickets(神题!线段树or树状数组)
题目链接:POJ 2828 Buy Tickets【题意】给了你 n(1 7 #include 8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int pos[MAX], val[MAX], ans[MAX];13.....
分类:其他好文   时间:2014-05-19 10:10:34    阅读次数:282
HDU 2795 Billboard(线段树)
题目链接:HDU 2795 Billboard【题意】给你一张h*w(1 7 #include 8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int tree[MAX= val)26 {27 ...
分类:其他好文   时间:2014-05-19 10:09:17    阅读次数:419
hust 1625 Chessboard
题目描述Given an N*N(N#include#include#includeusing namespace std;const int maxn=1001;int group[maxn][maxn];bool vis[maxn][maxn];int dx[4]={0,0,1,-1};int ...
分类:其他好文   时间:2014-05-19 09:06:30    阅读次数:379
gcc支持的标签
#include #include int main(/*int argc, char const *argv[]*/){ void * target; time_t now = time(NULL); if(now & 1) target = &&odd; else target = &&e...
分类:其他好文   时间:2014-05-18 20:27:53    阅读次数:306
二分搜索的运用(1最大化最小值)
//#define LOCAL#include#includeusing namespace std;int const MAX_N=10005;int const MAX_M=100;int const INF=100000000;int N,M,x[MAX_N],lb,ub;//判断是否满足条件...
分类:其他好文   时间:2014-05-18 19:38:50    阅读次数:378
hdu1166敌兵布阵
1 //Accepted 250MS 2480K 2 #include 3 #include 4 const int MAXN = 50005; 5 struct node 6 { 7 int l,r; 8 int add,sum; 9 }f[3*MAXN];10 int n;...
分类:其他好文   时间:2014-05-17 20:36:37    阅读次数:316
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!