码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
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
Codeforces Round #246 (Div. 2) A. Choosing Teams
给定n k以及n个人已参加的比赛数,让你判断最少还能参加k次比赛的队伍数,每对3人,每个人最多参加5次比赛#include using namespace std;int main(){ int n,k, cnt = 0; cin >> n >> k; for(int i = 0 ...
分类:其他好文   时间:2014-05-19 08:40:56    阅读次数:239
AC自动机
hdu2222 字符串多模匹配算法 采用kuangbin模板#include #include #include #include #include using namespace std;struct Trie{ int next[500010][26],fail[500010],end[5...
分类:其他好文   时间:2014-05-19 08:36:17    阅读次数:234
浅析C/C++中的switch/case陷阱
浅析C/C++中的switch/case陷阱 先看下面一段代码: 文件main.cpp#includeusing namespace std;int main(int argc, char *argv[]){ int a =0; switch(a) { case ...
分类:编程语言   时间:2014-05-19 07:08:14    阅读次数:429
C++PRIMER 阅读笔记 第三章
本章主要介绍 string vector 和 bitset, 不能贪多,现在本文主要介绍 string 与 vector头文件中最好不要使用namespace std, 因为头文件会直接被预处理器放置到C中std::string 的构造方式: string s1; string s2(s1); st...
分类:编程语言   时间:2014-05-18 20:31:41    阅读次数:378
windows系统调用 进程快照
1 #include "windows.h" 2 #include "tlhelp32.h" 3 #include "iostream" 4 using namespace std; 5 6 #pragma comment(lib,"kernel32.lib") 7 8 DWORD GetKe...
分类:Windows程序   时间:2014-05-18 20:01:58    阅读次数:535
HDU2209 ( 翻纸牌游戏 )
思路:枚举然后深搜,时间复杂度有点高。代码: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int a[25]; 7 char c[25]; 8 int flag; 9 int len;10 int judg...
分类:其他好文   时间:2014-05-18 19:51:19    阅读次数:341
POJ 1195 2维线段树(树套树实现) 树状数组
1: #include 2: #include 3: #include 4: #include 5: #include 6: using namespace std; 7: 8: #define LL(a) a>1; 32: sub_build(subl, mid, LL(subidx), idx)...
分类:其他好文   时间:2014-05-18 19:43:43    阅读次数:395
boost::bind boost::function
#include #include #include #include #include using namespace boost; using namespace std; class point {public: point(int a=0,int b=0):x(a),y(b) {}...
分类:其他好文   时间:2014-05-18 19:42:18    阅读次数:290
tsinsen A1486. 树(王康宁) 边分治+字典树
不知为何,这个代码只能得95分放一下傻逼代码。。。#include#include#include#includeusing namespace std;int n,K;int nn2=1,nn=1,nod;#define N 1000000#define ed(x) (x>>1)#define a...
分类:其他好文   时间:2014-05-17 17:55:40    阅读次数:425
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!