方法一: 获得文件大小需要用到2个函数:fseek() , ftell()
fseek()函数: 原型:intfseek(FILE *stream, long offset, int fromwhere); 参数: stream:
第一个参数stream为文件指针 offset : 第...
分类:
编程语言 时间:
2014-05-16 21:12:40
阅读次数:
307
一、 对象 1. 属性 1) 属性 a) 数据类型
基本数据类型:整型(byte、short、int、long),浮点型(float、double)、字符型(char)、布尔型(boolean)。
引用数据类型:自定义类型、数组、接口。 2) 方法 a) 方...
分类:
编程语言 时间:
2014-05-15 16:45:41
阅读次数:
374
一、简介 线程池类为
java.util.concurrent.ThreadPoolExecutor,常用构造方法为:ThreadPoolExecutor(int
corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit...
分类:
编程语言 时间:
2014-05-14 10:10:22
阅读次数:
321
serialVersionUID作用:序列化时为了保持版本的兼容性,即在版本升级时反序列化仍保持对象的唯一性。有两种生成方式:一个是默认的1L,比如:private
static final long serialVersionUID = 1L;一个是根据类名、接口名、成员方法及属性等来生成一个64...
分类:
其他好文 时间:
2014-05-14 07:56:58
阅读次数:
316
1 /** 2 大意:给定一组x[],y[],z[] 确定有没有两个不同的x[i], x[j]
看是否存在一个ID使得 3 y[i]17 #include 18 using namespace std;19 long long
x[1010],y[1010],z[1010];20 2...
分类:
其他好文 时间:
2014-05-13 21:15:24
阅读次数:
352
1 #include 2 #include 3 #include 4 using namespace
std; 5 6 int get2(long long n){ 7 if(n==0) 8 return 0; 9 int cnt =0;10 whi...
分类:
其他好文 时间:
2014-05-13 21:03:03
阅读次数:
329
大致题意:给出一个整数n,(1 int n,flat;unsigned long long
b;void DFS(unsigned long long a,int step){ if(flat||step==19) { return ; }
if(a%n==0)...
分类:
其他好文 时间:
2014-05-13 19:59:23
阅读次数:
276
1 /** 2 给定一定范围求其内的素数 3 4 注意: 5 **/ 6 7 #include 8
#include 9 #include 10 using namespace std;11 #define maxn 100000012 long long
prime[500000];1...
分类:
其他好文 时间:
2014-05-13 19:50:13
阅读次数:
242
zoj 3673 1 /** 2 6700417 3 **/ 4 #include 5
#include 6 #include 7 #include 8 #include 9 using namespace std;10 11 typedef
unsigned long long LL;12 13 ...
分类:
其他好文 时间:
2014-05-13 18:07:32
阅读次数:
234
Problem Description
Acmers have been the Earth Protector against the evil enemy for a long time, now it’s your turn to protect our home.
There are 2 * n enemies in the map. Your task is to clear a...
分类:
其他好文 时间:
2014-05-13 11:29:40
阅读次数:
308