题目描述 Description
在河上有一座独木桥,一只青蛙想沿着独木桥从河的一侧跳到另一侧。在桥上有一些石子,青蛙很讨厌踩在这些石子上。由于桥的长度和青蛙一次跳过的距离都是正整数,我们可以把独木桥上青蛙可能到达的点看成数轴上的一串整点:0,1,……,L(其中L是桥的长度)。坐标为0的点表示桥的起点,坐标为L的点表示桥的终点。青蛙从桥的起点开始,不停的向终点方向跳跃。一次跳跃的距离是S到T...
分类:
其他 时间:
2015-08-15 11:59:26
收藏:
0 评论:
0 赞:
0 阅读:
228
以 led闪烁中的flashLed函数例子:库函数操作简单,但是效率不如寄存器操作的高;
寄存器操作很复杂,因为要熟悉上百个寄存器,但是程序效率很高/**下面是通过直接操作库函数的方式实现IO控制**/
while(1)
{
GPIO_ResetBits(GPIOB,GPIO_Pin_9); //LED0对应引脚GPIOF.9拉低,亮 等同LED0=0;
GPIO_SetBits...
分类:
其他 时间:
2015-08-15 11:59:06
收藏:
0 评论:
0 赞:
0 阅读:
220
HDU 5389 Zero Escape (类0/1背包)...
分类:
其他 时间:
2015-08-15 11:58:26
收藏:
0 评论:
0 赞:
0 阅读:
150
package org.phoenix.cases.webservice;
import java.util.LinkedList;
import org.phoenix.action.WebElementActionProxy;
import org.phoenix.model.CaseLogBean;
import org.phoenix.model.UnitLogBean;
import...
分类:
其他 时间:
2015-08-15 11:58:16
收藏:
0 评论:
0 赞:
0 阅读:
161
题目描述:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2338
The Towers of Hanoi Revisited
Time Limit: 5 Seconds
Memory Limit: 32768 KB Special Judge
You all must...
分类:
其他 时间:
2015-08-15 11:58:06
收藏:
0 评论:
0 赞:
0 阅读:
343
H5性能优化的两个原则
1、最少化请求个数
2、最小单个文件大小
最少请求个数
为什么要减少请求次数:
手机浏览器同时响应请求为4个请求(Android支持4个,iOS 5后可支持6个)
如何减少请求次数:
1、合并图片(将若干个小图合并成一个大图、雪碧图)
2、合并JS/CSS文件(Nginx_concat_module)
天猫与淘宝的线上实践:
...
分类:
其他 时间:
2015-08-15 11:57:56
收藏:
0 评论:
0 赞:
0 阅读:
416
最近发现要恶补的东西实在是太多了,DX还没学完,现在发现还要用Lua脚本语言,于是,我的笔记又加了一个系列,Lua学习笔记。
一.简介
Lua是一门小巧的脚本语言,其设计目的是为了嵌入应用程序中,从而为应用程序提供灵活的扩展和定制功能。Lua由标准C编写而成,几乎在所有操作系统和平台上都可以编译,运行。Lua并没有提供强大的库,这是由它的定位决定的。所以Lua不适合作为开发独立应用程序...
分类:
其他 时间:
2015-08-15 11:57:16
收藏:
0 评论:
0 赞:
0 阅读:
244
Description
Have you heard the fact “The base of every normal number system is 10” ? Of course, I am not talking about number systems like Stern Brockot Number System. This problem has nothing to do w...
分类:
其他 时间:
2015-08-15 11:56:56
收藏:
0 评论:
0 赞:
0 阅读:
296
初始化方法的标准结构是这样子的:
- (instancetype)init
{
self = [super init]; // call the designated initializer
if (self) {
// Custom initialization
}
return self;
}
我们主要来看看,这一句:
self...
分类:
其他 时间:
2015-08-15 11:56:46
收藏:
0 评论:
0 赞:
0 阅读:
170
今天写了一个System V消息队列的小例子,定义了一个如下的结构体:#define MSG_SIZE 8192struct request
{
long mtype;
int client_id;
char pathname[MSG_SIZE];
};
接着我调用msgsnd想把这个结构体发送给server,但是发现报错了:
msgsnd error, Invalid...
分类:
其他 时间:
2015-08-15 11:56:36
收藏:
0 评论:
0 赞:
0 阅读:
203
Billboard
Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 15625 Accepted Submission(s): 6580
Problem Description
At the entranc...
分类:
其他 时间:
2015-08-15 11:55:56
收藏:
0 评论:
0 赞:
0 阅读:
161
Description 反正切函数可展开成无穷级数,有如下公式 (其中0 <= x <= 1) 公式(1) 使用反正切函数计算PI是一种常用的方法。例如,最简单的计算PI的方法: PI=4arctan(1)=4(1-1/3+1/5-1/7+1/9-1/11+...) 公式(2) 然而,这种方法的效率很低,但我们可以根据角度和的正切函数公式: tan(a+...
分类:
其他 时间:
2015-08-15 11:55:36
收藏:
0 评论:
0 赞:
0 阅读:
205
题目链接:hdu 5380 Travel with candy
保持油箱一直处于满的状态,维护一个队列,记录当前C的油量中分别可以以多少价格退货,以及可以推货的量。每到一个位置,可以该商店的sell值更新队列中所有价格小于sell的(还没有卖)。用buy值更新队列中大于buy(卖掉了)。移动所消耗的油从价格最低的开始。
#include
#include
#include ...
分类:
其他 时间:
2015-08-15 11:55:26
收藏:
0 评论:
0 赞:
0 阅读:
129
Power Strings
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 37817
Accepted: 15653
Description
Given two strings a and b we define a*b to be their concate...
分类:
其他 时间:
2015-08-15 11:55:16
收藏:
0 评论:
0 赞:
0 阅读:
173
题目链接:hdu 5381 The sum of gcd
将查询离线处理,按照r排序,然后从左向右处理每个A[i],碰到查询时处理。用线段树维护,每个节点表示从[l,i]中以l为起始的区间gcd总和。所以每次修改时需要处理[1,i-1]与i的gcd值,但是因为gcd值是递减的,成log级,对于每个gcd值记录其区间即可。然后用线段树段修改,但是是修改一个等差数列。
#inclu...
分类:
其他 时间:
2015-08-15 11:55:06
收藏:
0 评论:
0 赞:
0 阅读:
112
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1251
题意:先给出字典。每次查询一个单词,求以该单词为前缀的个数。
思路:裸字典树
代码
#include
#include
#include
#include
#include
#include
using namespace std;
#define...
分类:
其他 时间:
2015-08-15 11:54:56
收藏:
0 评论:
0 赞:
0 阅读:
195
分布式文件系统
[hadoop]
KFS-Kosmos File System
fasthdf
介绍:http://www.programmer.com.cn/4380/
参考:
HDFS和KFS 比较分布式数据库
HBASE
hypertable
参考:
Hypertable 简介 (一个 C++ 的Bigtable开源实现) 开源云系统
OpenStack
参考:
云存储系统设计...
分类:
其他 时间:
2015-08-15 11:54:47
收藏:
0 评论:
0 赞:
0 阅读:
179
题目链接:hdu 5384 Danganronpa
把B集合串建立自动机,然后A集合串一一去匹配即可。
#include
#include
#include
#include
#include
#include
#include
using namespace std;
typedef long long ll;
const int maxn = 1e5 + 5...
分类:
其他 时间:
2015-08-15 11:54:36
收藏:
0 评论:
0 赞:
0 阅读:
147
DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of par...
分类:
其他 时间:
2015-08-15 11:53:36
收藏:
0 评论:
0 赞:
0 阅读:
186
操作系统:win7VS2010编写WebService与在IIS的发布中我已经说了IIS安装与使用,不明白的可以跳过去看。1.添加FTP站点2.3.4.5.zqz上的小黑点代表未启动,记得要启动!6.打开浏览器7.添加虚拟目录8.9.qq添加成功10.11.再次添加一个虚拟目录:aa12.13.14...
分类:
其他 时间:
2015-08-15 11:53:16
收藏:
0 评论:
0 赞:
0 阅读:
157