码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
Codeforces Round #249 (Div. 2) A. Black Square
水题#include #include #include using namespace std;int main(){ vector a(4); cin >> a[0] >> a[1]>>a[2]>>a[3]; string str; cin >> str; int res = 0; for(in...
分类:其他好文   时间:2014-06-14 23:00:14    阅读次数:249
Codeforces Round #247 (Div. 2) B - Shower Line
模拟即可#include #include #include using namespace std;int main(){ vector a(5); for(int i = 0; i > g[i][j]; } } int maxHappiness = 0; ...
分类:其他好文   时间:2014-06-14 22:57:10    阅读次数:207
表达式建树
//用数组实现树 1 #include 2 #include 3 #include 4 #define N 10000 5 #define optd 1 6 #define optr 2 7 using namespace std; 8 int treeL[N], treeR[N]; 9 cla.....
分类:其他好文   时间:2014-06-14 21:29:55    阅读次数:264
Codeforces Round #245 (Div. 2) A - Points and Segments (easy)
水到家了#include #include #include using namespace std;struct Point{ int index, pos; Point(int index_ = 0, int pos_ = 0){ index = index_; ...
分类:其他好文   时间:2014-06-14 21:21:40    阅读次数:281
poj 1035
题意:给定一个字典 然后在给定一系列字符串 问在字典中是否能找到此字符串 或者是否存在 删除 增加 改变 一个字符 使之成为相同的字符串思路:暴力 模拟改了几遍 1 #include 2 #include 3 #include 4 using namespace std; 5 char m...
分类:其他好文   时间:2014-06-14 21:11:22    阅读次数:219
windows系统调用 利用事件对象实现进程通信
1 #include "iostream" 2 #include "windows.h" 3 #include "cstring" 4 using namespace std; 5 6 static LPCTSTR g_szContinueEvent="w2kdg.EventDemo.event.....
分类:Windows程序   时间:2014-06-14 20:48:50    阅读次数:383
poj 1936
题意:给定两个字符串 判断是否在第二个字符串中存在子串(可以不连续)为第一个穿大水体#includeusing namespace std;char s[100001],t[100001];int main(){ int ls,le; int ts,te; int l1,l2; ...
分类:其他好文   时间:2014-06-14 20:41:37    阅读次数:184
Codeforces Round #245 (Div. 2) B - Balls Game
暴利搜索即可#include #include #include using namespace std;int main(){ int n,k,x; cin >> n >> k >> x; vector c(n); for(int i = 0 ; i > c[i]; ...
分类:其他好文   时间:2014-06-14 18:47:42    阅读次数:206
c++实现二叉搜索树
自己实现了一下二叉搜索树的数据结构,记录一下: #include using namespace std; struct TreeNode{ int val; TreeNode *left; TreeNode *right; TreeNode(int value) { val=value; left=NULL; right=NULL; } }; clas...
分类:编程语言   时间:2014-06-14 13:36:40    阅读次数:265
BZOJ 3562: [SHOI2014]神奇化合物 并查集+dfs
点击打开链接 注意到20w条边,但是询问只有1w,所以有很多边是从头到尾不变的。 首先离线处理,将从未删除的边缩点,缩点后的图的点数不会超过2w,对于每一次add或者delete,直接dfs看是否能从a走到b,然后维护一个ans。 数据不强,不然这种复杂度起码要跑10s。。 #include #include #include #include using namespace std; #...
分类:其他好文   时间:2014-06-14 12:08:22    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!