畅通工程续
点击打开链接
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 37269 Accepted Submission(s): 13759
Problem Description
某省自从实行了很...
分类:
其他好文 时间:
2015-08-21 19:31:02
阅读次数:
148
这道题不得不说是一道水题,只要你看过刘汝佳的白书的话,相信秒杀还是没问题的,题意是A和B两个人玩游戏,有1~n一堆数,每个人轮流从中取走一个数,并把他和他的所有的约数擦去。擦去最后一个数的人赢,A先开始,问谁会赢。
分析:本题的结论有些出乎意料,除了n=0是先手必败之外,其他的情况都是先手必胜。证明如下。
如果后手能赢,也就是后手有必胜策略,使得先手无论去哪第一次取哪一个数,后手都能获得最后的胜...
分类:
其他好文 时间:
2015-07-28 00:59:15
阅读次数:
163
简单贪心,只需要维护每一个点可以到达之前的最小值和次小值。#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define MAX(x,y) (((x)>(y)...
分类:
其他好文 时间:
2015-07-28 00:57:23
阅读次数:
113
05-图3. 六度空间 (30)
时间限制
1500 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
“六度空间”理论又称作“六度分隔(Six Degrees of Separation)”理论。这个理论可以通俗地阐述为:“你和任何一个陌生人之间所...
分类:
其他好文 时间:
2015-07-26 17:23:01
阅读次数:
204
05-图2. Saving James Bond - Easy Version (25)
时间限制
200 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
CHEN, Yue
This time let us consider...
分类:
其他好文 时间:
2015-07-26 06:15:34
阅读次数:
143
05-图1. List Components (25)
时间限制
200 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
CHEN, Yue
For a given undirected graph with N vertic...
分类:
其他好文 时间:
2015-07-25 18:33:06
阅读次数:
115
04-树9. Path in a Heap (25)
时间限制
150 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
CHEN, Yue
Insert a sequence of given numbers into an ...
分类:
其他好文 时间:
2015-07-25 12:25:48
阅读次数:
128
04-树8. Complete Binary Search Tree (30)
时间限制
100 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
CHEN, Yue
A Binary Search Tree (BST) is ...
分类:
其他好文 时间:
2015-07-25 10:41:28
阅读次数:
193
04-树6. Huffman Codes (30)
时间限制
200 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
CHEN, Yue
In 1953, David A. Huffman published his pape...
分类:
其他好文 时间:
2015-07-25 09:27:06
阅读次数:
283
04-树4. Root of AVL Tree (25)
时间限制
100 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
CHEN, Yue
An AVL tree is a self-balancing binary se...
分类:
其他好文 时间:
2015-07-22 23:03:40
阅读次数:
257