码迷,mamicode.com
首页 >  
搜索关键字:dollar sign    ( 4987个结果
POJ 3181 Dollar Dayz
其实这道题就是简单的完全背包问题。从低到高推断出每种硬币的所有面额的解即可。当然,离线的话会慢一点。可以将问题需要求出的子问题全部求出来。下一个问题出现的时候,如果之前已经求解过则不必求解,否则在之前的基础上继续求解。原本觉得没什么好写的,关键是同样的方法用STL中的vector代替数组会超时!搞得以后都不敢用STL了..... #include #include #include #in...
分类:其他好文   时间:2015-02-07 20:22:39    阅读次数:192
Cas(01)——简介
Cas的全称是Centeral Authentication Service,是对单点登录SSO(Single Sign On)的一种实现。其由Cas Server和Cas Client两部分组成,Cas Server是核心,而Cas Client通常就对应于我们的应用。一个Cas Server可以对应于多个Cas Client。它允许我们在一个Client进行登录以后无需再让用户输入用户名和密码...
分类:其他好文   时间:2015-02-06 11:23:14    阅读次数:118
PHP实现商城购物车类(SESSION+单例模式 )(亲测)
1 sign = mt_rand(1,10000); 17 18 } 19 //防止外界克隆 20 final protected function __clone(){ 21 } 22 //单例方法,获取实例 23 protec...
分类:Web程序   时间:2015-02-05 13:15:31    阅读次数:291
分支-20. 计算符号函数的值(10)
对于任一整数n,符号函数sign(n)的定义如下: 请编写程序计算该函数对任一输入整数的值。 输入格式: 输入在一行中给出整数n。 输出格式: 在一行中按照格式“sign(n) = 函数值”输出该整数n对应的函数值。 输入样例 1: 10 输出样例 1: sign(10) = 1 输入样例 2: 0 输出样例 2: s...
分类:其他好文   时间:2015-02-04 13:00:07    阅读次数:144
PAT1006. Sign In and Sign Out
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door...
分类:其他好文   时间:2015-02-04 09:21:25    阅读次数:143
1006. Sign In and Sign Out
1006. Sign In and Sign Out (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAt the beginning of every day, the first person who signs in ...
分类:其他好文   时间:2015-02-03 14:46:08    阅读次数:130
一个由sizeof引发的问题
在C/S程序中,往往需要在服务端和客户端传送结构体,在最近的一个项目中定义了如下的结构体: class ISign { public: unsigned short m_sSign; long m_sSumLen; char md5[40]; long reqId; }; #define SIGN_LEN sizeof(ISign) 客户端和服务器端都使用了该结构体,由于在服务器...
分类:其他好文   时间:2015-02-02 09:35:18    阅读次数:175
php 格式化金额
1 /** 2 * 格式化金额 3 * 4 * @param int $money 5 * @param int $len 6 * @param string $sign 7 * @return string 8 */ 9 function format_money($money, ...
分类:Web程序   时间:2015-02-01 18:58:15    阅读次数:397
Javascript之sprintf
/** * * Javascript sprintf * http://www.webtoolkit.info/ * * %% – Returns a percent sign * %b – Binary number * %c – The character according to the ASCII value * %d – Signed decimal number * %f...
分类:编程语言   时间:2015-02-01 16:11:24    阅读次数:178
1006. Sign In and Sign Out
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 struct stu 8 { 9 char ID[16];10 int GetTime[3];11 int LeaveT...
分类:其他好文   时间:2015-02-01 00:31:04    阅读次数:270
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!