题意:已知n、d1、d2....dm,Alice先生成一个数S1=0,Bob再生成一个数S2=S1+dk,之后他们生成的数遵循这样的条件:Si=S(i-1)+dk,或者Si=S(i-1)-dk,其中1
分析:
既然想不出什么直接搜索之类的方法,那么一定就是找规律了。这题我们来推一下他的条件得到每个人每一步的最利于自己的做法。
考虑三个数:S(i-2),S(i-1),Si,假设当前步骤是生成S...
分类:
其他好文 时间:
2015-08-06 00:38:25
阅读次数:
125
1506的加强版
City Game
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 5587 Accepted Submission(s): 2412
Problem Description
Bob is a strate...
分类:
其他好文 时间:
2015-08-03 19:23:47
阅读次数:
115
Bob想要构造一张由n个节点构成的图。构造的过程由两步组成:首先Bob会取出n个孤立的点,并把它们从1到n编号,然后对每个节点用一种颜色染色,Bob一共可以使用K种不同的颜色。接下来Bob会在这张图中加入一些有向边,对于每一个编号范围在[2,n]的节点i,Bob有可能选择一个节点j满足j 2 #i....
分类:
其他好文 时间:
2015-08-02 23:02:22
阅读次数:
167
Destroying The GraphTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 7570Accepted: 2423Special JudgeDescriptionAlice and Bob play the followin...
分类:
其他好文 时间:
2015-08-02 13:16:57
阅读次数:
214
一、加密解密过程描述:互联网数据传输需要实现:数据隐秘性,数据完整性,身份认证和密钥交换;例如:Alice向Bob传输数据;数据加密过程:1、Alice生成原数据,用单向加密算法计算出原数据的特征码;2、用自己的私钥加密原数据特征码并附加在原数据的后面;3、用对称加密算法..
分类:
其他好文 时间:
2015-08-02 06:45:29
阅读次数:
432
DescriptionGeorgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, …, and place N chessmen on different grids, as shown i...
分类:
其他好文 时间:
2015-08-01 17:21:22
阅读次数:
114
Description
Alice and Bob decide to play a funny game. At the beginning of the game they pick n(1 <= n <= 10
6) coins in a circle, as Figure 1 shows. A move consists in removing one or two adjacen...
分类:
其他好文 时间:
2015-07-31 18:33:26
阅读次数:
118
这题的第一问是一个裸最大流,不多说了,关键在于第二问。首先有一个结论,Bob一定把费用加在一条边上,于是我们就可以二分每条边的流量,验证是否能得到最大流即可
code:
#include
#include
#include
#define inf 0x7fffffff
using namespace std;
int n,m,p,e,ei;
int point[101],next[2001];...
分类:
其他好文 时间:
2015-07-29 17:10:52
阅读次数:
122
C:\Users\Bob>ipconfig|find /i "IPv" 本地链接 IPv6 地址. . . . . . . . : fe80::d495:6e3:6368:7d6c%5 IPv4 地址 . . . . . . . . . . . . : 169.254.80.80 本地链接 IPv6...
分类:
其他好文 时间:
2015-07-29 13:46:43
阅读次数:
151
Bob’s Race
Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2753 Accepted Submission(s): 888
Problem Description
Bob wants to hol...
分类:
其他好文 时间:
2015-07-28 21:20:20
阅读次数:
124