这个题目意思我给弄错了。真桑心没好好听TK的指导,只要在松弛操作里头记录前驱节点就可以了,还要注意long long,其实我有很多时候测试错了可以猜到要用long long才可以,但是不知道缘故,就单单怎么算,不是很了解。#include #include #include #include #in...
分类:
其他好文 时间:
2014-08-03 15:06:05
阅读次数:
188
一个map的超水题。#include #include #include #include #include #include #define LL long longusing namespace std;const int maxn = 200010;const int maxm = 20010...
分类:
其他好文 时间:
2014-08-03 15:05:15
阅读次数:
175
1.包装类除了Void和Character,其他六个全部都继承自Number。Number是一个抽象类。如下:
public abstract class Number implements java.io.Serializable {
public abstract int intValue();
public abstract long longValue();
pu...
分类:
编程语言 时间:
2014-08-03 12:51:35
阅读次数:
307
static long x, y;
public static long exgcd(long a, long b)
{
if (b == 0)
{
x = 1;
y = 0;
return a;
}
long r = exgcd(b, a % b);
long t = x;
x = y;
y = t - a / b * y;
return...
分类:
其他好文 时间:
2014-08-03 12:50:15
阅读次数:
268
//接前一章,本节主要介绍线性区以及相关线性区的操作。
线性区
Linux通过类型为vm_area_struct的对象实现线性区。
vm_area_struct:
struct vm_area_struct {
struct mm_struct * vm_mm; /* The address space we belong to. */
unsigned long vm_start...
分类:
系统相关 时间:
2014-08-03 10:21:55
阅读次数:
497
Big String
Time Limit: 2 Seconds Memory Limit: 65536 KB
We will construct an infinitely long string from two short strings: A = "^__^" (four characters), and B = "T.T" (three characters). R...
分类:
其他好文 时间:
2014-08-02 21:02:04
阅读次数:
291
自己定义CountDownTimer /** * 计时器 * @author Administrator * */ class TimeCount extends CountDownTimer{ public TimeCount(long millisInFuture, long coun...
分类:
移动开发 时间:
2014-08-02 20:41:24
阅读次数:
225
题目链接:点击打开链接
#include
#include
#include
using namespace std;
#define INF 0x3f3f3f3f
#define eps 1e-8
#define pi acos(-1.0)
typedef long long ll;
int main()
{
int i, j;
double m,n;
while...
分类:
其他好文 时间:
2014-08-02 18:20:43
阅读次数:
233
/*从要删除最后一个到第一个进行松弛操作, 因为如果从第一个到最后一个进行松弛操作,弟24行有可能不会更新,若要更新,就需要再一次对d[N][N]初始化*/ 1 #include 2 #include 3 using namespace std; 4 typedef long long ll;...
分类:
其他好文 时间:
2014-08-02 18:06:53
阅读次数:
186
这题有一点坑,用d[N]int的话会上溢 所以要用long long 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define N 100005 9...
分类:
其他好文 时间:
2014-08-02 17:55:43
阅读次数:
236