码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
Java for LeetCode 009 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.解题思路:由于题目中给定不能使用额外空间开销,因此不能转为String类型,我们需要一位一位处理。Java代码如下: static public boo...
分类:编程语言   时间:2015-04-26 10:42:59    阅读次数:131
C++控制台一闪而过
很多初学C++者,都会从控制台入手,但写出来的代码经常一闪而过,(有的编译器不会出现这样的情况)。 例如:#include using namespace std; //main函数是一个程序的入口 //int是整数类型(integer) //main函数的返回值是整数类型,所以要在函数名称前声明返回类型(int) int main() { cout<<"Hello wor...
分类:编程语言   时间:2015-04-26 09:33:55    阅读次数:150
uva 10891 Game of Sum (DP)
uva 10891 Game of Sum (DP)   This is a two player game. Initially there are n integer numbers in an array and players A and B get chance to take them alternatively. Each player can take one o...
分类:其他好文   时间:2015-04-26 09:31:20    阅读次数:140
LeetCode-Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are s...
分类:其他好文   时间:2015-04-26 06:58:15    阅读次数:108
内存分配速度的一点测试
LARGE_INTEGER litmp;LARGE_INTEGER qt1, qt2;QueryPerformanceFrequency(&litmp);double dff = (double)litmp.QuadPart;QueryPerformanceCounter(&qt1); int *a...
分类:其他好文   时间:2015-04-25 23:57:28    阅读次数:320
BNU - 49102
进化之地(Evoland)Time Limit: 1000msCase Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainSubmit Status PID: 491....
分类:其他好文   时间:2015-04-25 22:44:16    阅读次数:192
LeetCode-8 String to Integer (atoi)
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ...
分类:其他好文   时间:2015-04-25 22:40:26    阅读次数:147
Java for LeetCode 007 Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321解题思路:将数字翻转并不难,可以转成String类型翻转,也可以逐位翻转,本题涉及到的主要是边界和溢出问题,使用Long...
分类:编程语言   时间:2015-04-25 22:38:15    阅读次数:167
POJ 3667 Hotel
HotelTime Limit: 3000msMemory Limit: 65536KBThis problem will be judged onPKU. Original ID:366764-bit integer IO format:%lld Java class name:MainThe c...
分类:其他好文   时间:2015-04-25 19:40:22    阅读次数:148
Gray Code -- leetcode
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:其他好文   时间:2015-04-25 18:26:11    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!