方法一: 获得文件大小需要用到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
线性推,矩阵乘法+快速幂求通项。
传送门:点击打开链接
#include
#include
#include
#include
using namespace std;
#define LL long long
struct Mat{
LL f[2][2];
};
LL MOD;
Mat mul(Mat a,Mat b)
{
LL i,j,k;
...
分类:
其他好文 时间:
2014-05-15 14:53:10
阅读次数:
225
The Toy of Flandre Scarlet
Time Limit: 2 Seconds Memory Limit: 65536 KB
As you know, Flandre Scarlet loves her elder sister Remilia Scarlet, and of course, Remilia loves Flandre, too. B...
分类:
其他好文 时间:
2014-05-15 07:06:45
阅读次数:
259
一、android几种定时器的机制及区别。
答:在android中,经常用到的定时器主要有以下几种实现:
1、采用handler与线程的sleep(long)方法
开启一个线程,,每隔1s向Handler发送消息
public class MainActivity extends Activity {
private Handler myhandler;
private static...
分类:
移动开发 时间:
2014-05-15 06:26:20
阅读次数:
440
格式化输出主要包括控制状态标志、输出宽度、填充字符、输出精度等内容。其目的是实现特定的输出格式,实现方式有两种:使用状态标志和成员函数进行格式化输出和使用流操作符进行格式化输出。
1.使用状态标志和成员函数
输出标志由各种状态标志来确定,它们是定义在ios类中的枚举变量,引用时必须包含ios::前缀。常见的状态标志如下:
与此相关的主要是以下重要成员函数。
setf(long flag...
分类:
编程语言 时间:
2014-05-15 04:34:09
阅读次数:
319
http://acm.hdu.edu.cn/showproblem.php?pid=1224
基础的求最长路以及记录路径。感觉dijstra不及spfa好用,wa了两次。
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
#define...
分类:
其他好文 时间:
2014-05-14 20:59:54
阅读次数:
295
一、简介 线程池类为
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
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