码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
IOS :编译时出现的错误 ,希望可以有所帮助
1、"std::ios_base::Init::~Init()", referenced from答1: 如果出现这样的编译问题,是需要再加进libstdc++.dylib和libstdc++.6.dylib(为6.1使用)2、apple Mach-o Linker error答2: 通常是因为co...
分类:移动开发   时间:2014-07-16 19:14:54    阅读次数:222
【HDOJ】2267 How Many People Can Survive
BFS。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXN 305 8 9 typedef struct node_st {10 int x, y;11 ...
分类:其他好文   时间:2014-07-15 23:05:28    阅读次数:289
斐波那契加求幂运算
斐波那契博大精深啊,还有求幂的迭代也有点意思 1 //斐波那契有好多中方法 2 #include 3 #include 4 using namespace std; 5 6 //注意普通斐波那契,在太大数时就会发生越界,比如long long 只能存表示第92个数,这些都是小的斐波...
分类:其他好文   时间:2014-07-15 22:50:18    阅读次数:276
NWERC 2011 ABCDEH 题解
A:SPOJ NWERC11A A - Binomial coefficients 题解:点击打开链接 B: 点击打开链接   Bird tree 从下到上发现是个gcd的过程(辗转相除 #include #include #include using namespace std; int main() { int T; scanf("%d", &T);...
分类:其他好文   时间:2014-07-15 13:07:18    阅读次数:317
hdu 4544 湫湫系列故事——消灭兔子 优先队列+贪心
将兔子的血量从小到大排序,箭的威力也从小到大排序, 对于每只兔子将威力大于血量的箭加入队列,写个优先队列使得出来数位价钱最少。。 #include #include #include #include #include using namespace std; const int maxn=100010; struct tt { int d; int p; bool operator<...
分类:其他好文   时间:2014-07-15 12:52:52    阅读次数:321
HDU 1892 See you~
题意: 一块矩形空间  一开始每个格子都是1  有4种操作: S操作将(x1,y1)-(x2,y2)所画出的矩形中的数求和  A操作是在(x,y)加z  D是在(x,y)减z 注意不能减成负数  M是移动 思路: 裸二维树状数组…  POJ上有楼教主出过的题 代码: #include #include #include using namespace std; #defi...
分类:其他好文   时间:2014-07-15 12:32:01    阅读次数:279
Spoj 9887 Binomial coefficients 构造
题目链接:点击打开链接 #include #include #include #include #include using namespace std; const int MAX_N = 507; const long long INF = (long long)1e15; typedef long long ll; typedef pair pii; ll C[MAX_N][MA...
分类:其他好文   时间:2014-07-15 10:44:20    阅读次数:229
hdu 1722--Cake
由题意推得结论:p+q-gcd(p,q); /* * hdu 1722--Cake * date 2014/7/15 * state AC */ #include #include using namespace std; /* int gcd(int x,int y) { while(x!=y) { if(x>y)x=x-y; else y...
分类:其他好文   时间:2014-07-15 10:32:39    阅读次数:184
Codeforces Round #FF(255) DIV2 C - DZY Loves Sequences
A - DZY Loves Hash水题,开辟一个数组即可#include #include #include #include using namespace std;int main(){ int p,n; cin >> p >> n; vector buckets(302,f...
分类:其他好文   时间:2014-07-14 19:46:01    阅读次数:307
fzu 1753 Another Easy Problem
本题题意为求 t (t#include #include #define maxn 100010using namespace std;int sign[maxn];int pri[maxn];int tot;int e;int n[200],k[200];void getpri (){ me...
分类:其他好文   时间:2014-07-14 19:06:58    阅读次数:248
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!