码迷,mamicode.com
首页 >  
搜索关键字:front    ( 2274个结果
模拟投掷硬币100次
/*模拟投掷硬币*/#include<stdio.h>#include<stdlib.h>#include<time.h>int flip();/*声明函数*//*主函数*/int main(void){ int n,i,front,back; front=0; back=0;/*初始化*/ tim ...
分类:其他好文   时间:2017-04-14 22:59:02    阅读次数:209
数据结构总结(UPDATING......)
目标: 1.栈........√ 2.队列......√ 3.堆.........× 4.并查集...× 栈: 1 #define MAXN 65536 2 struct stack{ 3 int sz[MAXN],now; 4 stack() 5 { 6 now=0; 7 } 8 ~stack() ...
分类:其他好文   时间:2017-04-14 22:21:36    阅读次数:218
关于node npm的一个解决方法
解决Error: ENOENT: no such file or directory, scandir 'D:\IdeaWork\code-front-jet\node_modules\.npminstall\node-sass\3.7.0\node-sass\vendor' 执行 : npm re ...
分类:其他好文   时间:2017-04-14 16:21:18    阅读次数:189
UVALive 4726 Average ——(斜率优化DP)
这是第一次写斜率优化DP= =。具体的做法参照周源论文《浅谈数形结合思想在信息学竞赛中的应用》。这里仅提供一下AC的代码。 有两点值得注意:1.我这个队列的front和back都是闭区间的;2.在while(...) front++; 这个循环里面,<=写成<就会WA,不知道是为何(讲道理是肯定没问 ...
分类:其他好文   时间:2017-04-14 14:16:33    阅读次数:103
csuoj-1720-How to Get 2^n
题目: Description Johnson is very interested in the k-th power of 2 number, such as 2,4,8,16 .... So he always boasts that he is good at solving problem ...
分类:其他好文   时间:2017-04-14 10:02:28    阅读次数:310
HDU4372 Count the Buildings
There are N buildings standing in a straight line in the City, numbered from 1 to N. The heights of all the buildings are distinct and between 1 and N ...
分类:其他好文   时间:2017-04-14 00:19:28    阅读次数:199
ZOJ3469 Food Delivery[区间dp]
When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this time, we may call for ...
分类:其他好文   时间:2017-04-13 21:12:55    阅读次数:193
Codeforces Round #408 (Div. 2)ABCD
A. Buying A House 分别向左右枚举,找到符合题意的点,输出最短的长度*10。 #include <bits/stdc++.h> using namespace std; int n, k, s, a[105]; int main() { scanf("%d%d%d", &n, &s, ...
分类:其他好文   时间:2017-04-13 19:59:57    阅读次数:247
队列和优先队列
C++队列是一种容器适配器,它给予程序员一种先进先出(FIFO)的数据结构。1.back() 返回一个引用,指向最后一个元素2.empty() 如果队列空则返回真3.front() 返回第一个元素4.pop() 删除第一个元素5.push() 在末尾加入一个元素6.size() 返回队列中元素的个数 ...
分类:其他好文   时间:2017-04-13 17:43:26    阅读次数:208
URAL 1997 Those are not the droids you're looking for
二分图的最大匹配。 每一个$0$与$1$配对,只建立满足时差大于等于$a$或者小于等于$b$的边,如果二分图最大匹配等于$n/2$,那么有解,遍历每一条边输出答案,否则无解。 ...
分类:其他好文   时间:2017-04-12 04:17:52    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!