一、Java数据类型(简单称之为“四类八种”) java 基本的数据类型长度都是固定的,好处是在实现跨平台时就统一了。1.整型 byte short int long (分别是1,2,4,8个字节)类型存储需求位数取值范围byte1字节8位-128~127short2字节 16位-2^15 ~2^....
分类:
编程语言 时间:
2014-07-12 00:34:38
阅读次数:
234
Matlab预定义变量预定义变量功能描述pi圆周率,精确至小数点后15位i,j虚数inf,Inf无穷大nan,NaN非数值数据,如0/0clock时钟date日期eps计算机能区分两个数据之间的最下误差ans默认保存结果的变量(若没指定赋值变量)format格式设置格式效果short4位小数long...
分类:
其他好文 时间:
2014-07-11 10:02:19
阅读次数:
185
一道简单的dijkstra 写了好久。。。了个大去 果然代码太弱了#include#include#include#define INF 0x3f3f3f3f#define MAXM 1009using namespace std;long long x[MAXM*MAXM],y[MAXM*MAXM...
分类:
其他好文 时间:
2014-07-11 09:49:22
阅读次数:
196
话说今天这个1个同学2002的题目真的有可总结性吗。今天的结论是我的暴力又进化了,现在可以长达5KB,一节更比六节强。明天再来听评讲。#include#include#include#includeusing namespace std;struct edge{ long long to,d; ed...
分类:
其他好文 时间:
2014-07-11 09:46:51
阅读次数:
153
题目1描述:
写一个函数,输入n,求斐波那契数列的第n项。斐波那契数列的定义如下:
f(n) = 0 (n = 0); f(n) = 1 (n = 1); f(n) = f(n-1)+f(n-2) (n > 1);
分析描述:
在大多数的C语言教科书中,一般会用递归求斐波那契数列。代码如下:
long long Fibonacci(...
分类:
其他好文 时间:
2014-07-11 00:13:30
阅读次数:
185
题目链接:uva 10548 - Find the Right Changes
题目大意:给定A,B,C,求x,y,使得xA+yB=C,求有多少种解。
解题思路:拓展欧几里得,保证x,y均大于等于0,确定通解中t的取值。
#include
#include
#include
#include
using namespace std;
typedef long long ll...
分类:
其他好文 时间:
2014-07-11 00:03:25
阅读次数:
165
给定一个无向图,每个边有两个属性,长度和一个字母‘L',’O',‘V’,‘E'中的一个。从1点开始到达n点,每次必须按照L -> O -> V -> E -> ... -> E的顺序,到达终点时候必须经过E边...
分类:
其他好文 时间:
2014-07-10 22:05:14
阅读次数:
194
An IP address is 32-bit long. IP addresses are classified into A, B, C, D, and E classes, as shown in the figure below.
Please determine the class of an input IP address and obtain the corresponding IP address information according to the input 32-bit IP ...
分类:
其他好文 时间:
2014-07-09 12:43:54
阅读次数:
232
题目大意:Codeforces 444C DZY Loves Colors
题目大意:两种操作,1是修改区间上l到r上面德值为x,2是询问l到r区间总的修改值。
解题思路:线段树模板题。
#include
#include
#include
#include
using namespace std;
const int maxn = 5*1e5;
typedef long ...
分类:
其他好文 时间:
2014-07-09 10:28:24
阅读次数:
153
??
Showstopper
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 1218
Accepted: 356
Description
Data-mining huge data sets can be a painful and long last...
分类:
其他好文 时间:
2014-07-09 09:39:17
阅读次数:
242