码迷,mamicode.com
首页 >  
搜索关键字:integer game    ( 20395个结果
ZOJ 3593 One Person Game
One Person GameTime Limit:2 Seconds Memory Limit:65536 KBThere is an interesting and simple one person game. Suppose there is a number axis under your...
分类:其他好文   时间:2014-05-24 07:02:17    阅读次数:310
LeetCode:Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return –321 这道题应该不用详细说了。比较简单。唯一的是要注意特殊值0. public class Solution { publ...
分类:其他好文   时间:2014-05-24 01:39:59    阅读次数:170
ZOJ 3329 - One Person Game
题意:每次筛三个骰子面分别为k1,k2,k3,如果三个骰子的值分别为a,b,c则得分置0,否则得到分数加上三个骰子的值的和,如果得分大于等于n则结束游戏。设E[i]表示当前得到i分时结束游戏的期望。则E[i]=sum{Pk*(E[i+k]+1)|k为三个骰子可能取得的分数且不包括a,b,c这种情况}...
分类:其他好文   时间:2014-05-23 11:48:09    阅读次数:303
java中String类型转换方法
integer to String :int i = 42;String str = Integer.toString(i);orString str = "" + i double to String :String str = Doubl...
分类:编程语言   时间:2014-05-20 12:54:45    阅读次数:358
zoj 2083 Win the Game(博弈SG函数)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1083题意差不多是这样,给你n条线的长度,让你染色,每次只能染2个长度单位,让你先染,问是否能赢的胜利其实这题和取石子的那题(ECNU 1328 Stripes)差不多,...
分类:Windows程序   时间:2014-05-19 19:37:59    阅读次数:534
SQLite基本(实例FileOrganizer2013.5.12)
工具用 SQLite Dev数据类型:1.NULL:空值。2.INTEGER:带符号的整型,具体取决有存入数字的范围大小。3.REAL:浮点数字,存储为8-byte IEEE浮点数。4.TEXT:字符串文本。5.BLOB:二进制对象。=======================添加 sqlite-...
分类:数据库   时间:2014-05-19 17:09:21    阅读次数:349
Leetcode | Jump Game I && II
Jump Game IGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents ...
分类:其他好文   时间:2014-05-19 15:16:57    阅读次数:373
[dp] zoj 3769 Diablo III
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3769 Diablo III Time Limit: 2 Seconds      Memory Limit: 65536 KB Diablo III is an action role-playing video game. A fe...
分类:其他好文   时间:2014-05-18 18:40:35    阅读次数:345
LeetCode 013 Roman to Integer
【题目】 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 【题意】 把罗马数转换为整数 【思路】 罗马数字中只使用如下七个基值字母:M,D,C,L,X,V,I,分别用来表示1000、500、100、50、10、5、1。 大体思路是每个罗马字母对应的值相加即可, 但需要处理900, 400, 90, 40, 9, 4这几个特殊...
分类:其他好文   时间:2014-05-18 07:58:54    阅读次数:293
Java学习笔记_18_字符串、包装类、原始数据类剪得转换
18. 字符串、包装类、原始数据类剪得转换:  各个转换如下:  1>String 转换成Integer:   Integer integer = new Integer(“string”);或   Integer Integer = Integer.valueOf(String);   注:String必须是数字字符串,如:”1232“。  2>Integer 转换成String:...
分类:编程语言   时间:2014-05-18 07:40:29    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!