方法一: 获得文件大小需要用到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
题意:在一个二维矩阵中找到给定的值。矩阵从上到下从左到右有序
思路:二维空间的二分查找
先在一维里找中间位置,再将该位置转为二维空间里的下标
注:下标比较难弄,得注意点
复杂度: 时间O(log n),空间O(1)
相关题目:
Search Insert Position...
分类:
其他好文 时间:
2014-05-15 07:24:42
阅读次数:
253
一、简介 线程池类为
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
position:absolute;//绝对定位
居于整个浏览器position:relative;//相对定位 以上一个标签为参照物
分类:
其他好文 时间:
2014-05-14 06:52:16
阅读次数:
274
大致题意:给出一个整数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