一、数据类型 Java支持两种数据类型:基本类型和引用类型。基本类型有布尔(boolean)类型和数值类型,数值类型有整数类型(byte、short、char、int、long)和浮点数类型(float、double),其中char也称为字符类型,统称八大基本数据类型。byte型整数在内存中占8位....
分类:
编程语言 时间:
2014-07-19 16:37:25
阅读次数:
189
1,factorials[i] = i * factorials[i - 1];#include using namespace std;const int ArSize = 16;int main() {long long factorials[ArSize];factorials[1] = fa...
分类:
其他好文 时间:
2014-07-19 15:38:16
阅读次数:
202
1881. Long problem statementTime limit: 0.5 secondMemory limit: 64 MBWhile Fedya was writing the statement of the problem GOV Chronicles, he realized....
分类:
其他好文 时间:
2014-07-19 15:08:30
阅读次数:
214
public long getSDTotalSize(){ /*获取存储卡路径*/ File sdcardDir= Environment.getExternalStorageDirectory(); /*StatFs 看文件系统空间使用情况*/ StatFs statFs=...
分类:
移动开发 时间:
2014-07-19 13:33:04
阅读次数:
192
迷宫寻宝(一)时间限制:1000ms | 内存限制:65535KB难度:4描述一个叫ACM的寻宝者找到了一个藏宝图,它根据藏宝图找到了一个迷宫,这是一个很特别的迷宫,迷宫里有N个编过号的门(N 2 #include 3 #include 4 #define LL long long 5 usin.....
分类:
其他好文 时间:
2014-07-19 11:29:24
阅读次数:
189
Sticks时间限制:3000ms | 内存限制:65535KB难度:5描述George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he...
分类:
其他好文 时间:
2014-07-19 11:27:30
阅读次数:
264
一、套接字的地址结构. IPV4套接字地址结构通常也称为"网际套接字地址结构",它以sockaddr_in 命名;POSIX定义如下:#include struct in_addr{ unsigned long s_addr; /*32-bit IPv4 address ...
分类:
系统相关 时间:
2014-07-19 09:34:33
阅读次数:
408
GCD SUMTime Limit:8000/4000MS (Java/Others)Memory Limit:128000/64000KB (Java/Others)SubmitStatusProblem Description给出N,M执行如下程序:long long ans = 0,ansx ...
分类:
其他好文 时间:
2014-07-19 09:15:30
阅读次数:
234
基本数据类型:8种
1.整型:
byte 1个字节 8位 -128到127
short
2个字节 16位 -2^15到(2^15)-1
int
4个字节 32位 -2^32到(2^32)-1
long 8个字节 64位 -2^64到(2^64)-1
2.浮点类型:
float 4个字节 32位
double...
分类:
编程语言 时间:
2014-07-19 08:24:42
阅读次数:
263
线上程序不断重启,查看log发现是进程因为SIGXFSZ信号退出。对过大的文件进行操作的时候会产生此信号,一般只在32位机器上出现,文件大小限制为2G。用lsof查看进程打开的文件,果然有一个文件达到2G。
解决方案:编译时加上参数:-D_FILE_OFFSET_BITS=64;代码中调用lseek时参数为off_t(不要为int或long,否则在32位和64位中表现不同)。
...
分类:
系统相关 时间:
2014-07-19 08:18:29
阅读次数:
281