题目链接
题意:塔防游戏,长为n的一条路上建造m个箭塔,每个箭塔攻击范围为[l, r],每格造成伤害为d,再给出k只怪兽的血量h,出现位置x,怪兽向前走,问最后还有几只怪兽存活。
思路:先求出每个格子造成的伤害,开一个stack数组,stack[l] += d,stack[r + 1] -= d,然后从前往后扫描一次,这样就可以得到每个格子造成的伤害;然后求出第1格到第i格...
分类:
其他好文 时间:
2014-08-19 20:53:15
阅读次数:
183
原文:IS2009制作Oracle 静默安装包(一)感谢空白先生特许授权上一篇: MyEclipse中消除frame引起的“the file XXX can not be found.Please check the location and try again.”的错误 本文经原作者特许授权于海洋...
分类:
数据库 时间:
2014-08-19 18:55:15
阅读次数:
357
NineOldAndroid1.之前我们用到的第动画是frame和tween动画也就是帧动画,补间动画现在多了一种动画,它包含完了前面动画的所有状态。属性动画(Property Anmation):这个是在Android 3.0中才引进的,它更改的是对象的实际属性,在View Animation(T...
分类:
移动开发 时间:
2014-08-19 18:18:55
阅读次数:
287
UIButton *signBtn = [UIButton buttonWithType:UIButtonTypeCustom];
signBtn.frame = CGRectMake(0, 0, 80, 40);
[signBtn.layer setMasksToBounds:YES];
[signBtn.layer setCornerRadius:10.0]; //设置矩形四个圆角半径
...
分类:
其他好文 时间:
2014-08-19 16:31:58
阅读次数:
213
1、UIScrollView下图片的捏合放大和缩小,我们直接用scrollView自带的属性就可以了,这个没什么好说,我们直接贴代码:[plain] view plaincopy//控制器 theScroll=[[UIScrollView alloc] initWithFrame:frame];.....
分类:
其他好文 时间:
2014-08-19 14:19:54
阅读次数:
170
Java栈与堆 ----对这两个概念的不明好久,最终找到一篇好文,拿来共享 1. 栈(stack)与堆(heap)都是Java用来在Ram中存放数据的地方。与C++不同,Java自己主动管理栈和堆,程序猿不能直接地设置栈或堆。 2. 栈的优势是,存取速度比堆要快,仅次于直接位于CPU中的寄存器。但缺...
分类:
编程语言 时间:
2014-08-19 14:13:54
阅读次数:
209
//#pragma comment(linker, "/STACK:16777216") //for c++ Compiler#include #include #include #include #include #include #include #include #define ll long...
分类:
其他好文 时间:
2014-08-19 12:28:14
阅读次数:
261
什么是堆和栈,它们在哪儿? 英文原文:What and where are the stack and heap? 问题描述 编程语言书籍中经常解释值类型被创建在栈上,引用类型被创建在堆上,但是并没有本质上解释这堆和栈是什么。我仅有高级语言编程经验,没有看过对此更清晰的解释。我的意思是我理解什...
分类:
其他好文 时间:
2014-08-19 10:42:34
阅读次数:
283
iframe方式嵌入页面的操作实验实验hi, this is a.html, frame below show b.htmlhi, this is b.html. this page call by localhost domain.
分类:
其他好文 时间:
2014-08-19 00:55:43
阅读次数:
294
题意:不解释(这题是学数据结构必做的)
以前自学数据结构的时候,只是会顺序表来模拟栈。最近简单学习了stack头文件 又来做了一遍(还是以前的味道)
代码:
#include
#include
#include
using std::stack;
stack s;
char s1[100], s2[100];
int vis[10];
char stac[100];
int main...
分类:
其他好文 时间:
2014-08-18 22:09:23
阅读次数:
283