上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 99 下一页

2012年8月21日

G-Wind

摘要: 算法:计算期望值,算出每棵蘑菇的概率,再乘以其期望。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<map>#include<iostream>#include<algorithm>#include<vector>using namespace std;struct pnode{ int h, x, l, r;}p[100100];struct qnode{ int x, w;}q[11000];int N, M;i 阅读全文

posted @ 2012-08-21 16:35 more think, more gains 阅读(191) 评论(0) 推荐(0) 编辑

E- Seven tombs 表达式运算 + DFS

摘要: 算法:1.表达式运算2.DFS枚举View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<stack>#include<algorithm>using namespace std;stack< 阅读全文

posted @ 2012-08-21 16:30 more think, more gains 阅读(198) 评论(0) 推荐(0) 编辑

题目1101:计算表达式 九度OJ

摘要: 算法:1.1个栈寄存运算符,1个栈寄存操作数2.优先级用数组保存好View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<stack>#include<algorithm>using namesp 阅读全文

posted @ 2012-08-21 08:49 more think, more gains 阅读(232) 评论(0) 推荐(0) 编辑

2012年8月19日

C++ 中嵌入汇编

摘要: C++ 中嵌入汇编View Code #include<iostream>using namespace std;int main(){ int a,b; while(scanf("%d%d",&a,&b)==2){ int *c=&a; __asm{ mov eax,c; mov eax,[eax]; mov ebx,b; lea eax,[eax+ebx]; mov a,eax; } cout<<a... 阅读全文

posted @ 2012-08-19 19:56 more think, more gains 阅读(204) 评论(0) 推荐(0) 编辑

2012年8月18日

HDU 3486 RMQ + 二分

摘要: 算法:1.RMQ 求区间最值2.二分枚举段的数量,注意是段的数量和其和成正比,也就是枚举段的数量。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespace s 阅读全文

posted @ 2012-08-18 17:31 more think, more gains 阅读(138) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 99 下一页

导航