摘要://MyGrowStack.h#if !defined (STACK_H)
#define STACK_H const int InitStack=1;
const int ShrinkNum=8;
const int Maxbufsize=20;
const int TokError=0;
const int TokNum=1; class IStack
{ friend class StackSeq;
public: IStack(); ~IStack(); int Pop(); void Push(int n); int Top() const; bool I... 阅读全文
c++中的typename与class
2012-03-12 21:43 by javaspring, 425 阅读, 0 推荐, 收藏,
摘要:在泛型编程的形参表中,关键字typename和class具有相同的含义,可以相互使用,两个关键字都可以在同一模板形参表中使用: 1. typename用在模板定义里,标明其后的模板参数是类型参数。template<typename T,class U> calc (const T&, const U& ); // 定义一个返回参数中较大者的通用函数
template <typename T>
const T& max(const T& x, const T& y)
{ if (y < x) { return x; } ret 阅读全文
120行JavaScript搞定俄罗斯方块
2012-03-12 16:30 by javaspring, 286 阅读, 0 推荐, 收藏,
摘要:本文转自lihanbing<html><style>.c {margin :1px;width:19px;height:19px;background:red;position:absolute;}.d {margin :1px;width:19px;height:19px;background:gray;position:absolute;}.f {top:0px;left:0px;background:black;position:absolute;}</style><body></body><html>< 阅读全文
2676_Sudoku
2012-03-10 01:09 by javaspring, 211 阅读, 0 推荐, 收藏,
摘要:SudokuTime Limit:2000MSMemory Limit:65536KTotal Submissions:9679Accepted:4791Special JudgeDescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The oth 阅读全文
2488_A Knight's Journey
2012-03-10 00:15 by javaspring, 236 阅读, 0 推荐, 收藏,
摘要:A Knight's JourneyTime Limit:1000MSMemory Limit:65536KTotal Submissions:18356Accepted:6181DescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeyaround the world. Whenever a knight moves, it is two squares in o 阅读全文
3087_Shuffle'm Up
2012-03-09 23:09 by javaspring, 253 阅读, 0 推荐, 收藏,
摘要:DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips,S1andS2, each stack containingCchips. Each stack may contain chips of several different colors.The actual shuffle operation is perform 阅读全文
Android的所有权限说明
2012-03-09 23:04 by javaspring, 123 阅读, 0 推荐, 收藏,
摘要:Android权限分的很细,但命名比较人性化,Android permission比SymbianCapabilities有了不少改进,下面就来看看权限许可都有哪些定义吧,发现还是比较繁多的,如果发现你的程序某个地方调试错误很可能是Androidpermission的访问控制在作怪,这也是为了安全防止手机成为病毒的场所。Android开发网获取到的消息来看不用购买高昂的数字签名证书,权限许可权由用户决定而不是手机制造商和平台提供商,这一点不得不说明为Android开发人员着想,下面的信息都是需要添加在androidmanifest.xml文件中。程序执行需要读取到安全敏感项必需在android 阅读全文
J2SE小结
2012-03-08 10:04 by javaspring, 125 阅读, 0 推荐, 收藏,
摘要:都是些J2SE最基本最常用的东西。画完这个东西预示着从此转向java了吧。 阅读全文
杭电 2832 水题
2012-02-29 09:31 by javaspring, 146 阅读, 0 推荐, 收藏,
摘要:此题应该是有公式的,可惜吾等弱菜实在太弱,程序愣是跑了9500ms才过,,,惭愧。看着别人0msAC的,无颜面对啊。。。题目:Snail’s troubleTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 416Accepted Submission(s): 226Problem DescriptionOnce upon a time, there was a poor snail. Every day, it tried very ... 阅读全文
---西游记~~中的公司政治
2012-02-28 16:33 by javaspring, 190 阅读, 0 推荐, 收藏,
摘要:小时候看《西游记》,感觉妖怪是最笨的,哪里需要孙猴子去打,自己就笨死了,明明唐僧落到手中,却总是不忙吃,结果总是被神仙们连窝铲除,连山贼这个很有前途的职业都做不成。要我是妖怪,先把唐僧吃了,吃一口就长生不老,全吃了还不功力暴增,金刚不坏呀,那时候再去跟孙猴子和各路神仙PK,其奈我何?经历的事情多了,才知道问题不那么简单。《西游记》虽然讲的是神仙妖魔世界,本质上仍然是一个政治故事。既然是政治,决定能否吃掉对方的,自然不是嘴,而是权力。从政治角度来说,唐僧根本就不是一种适于食用的生物,为什么呢?因为在政治生态圈中,妖怪们看似强大,却处于食物链的低端,而唐僧反之,看似文弱,却处于食物链的高端。“吃唐 阅读全文
浙公网安备 33010602011771号