今天老师给我们讲了迪菲-赫尔曼算法,大概意思是通信双方不需要知道对方是谁都能通信。以下的图片来自维基百科只要Alice的K等于Bob的K双方就可以通信了,现在问题来了,我用了几组数据去做测试,都能得到相同的结果,为什么经过上面的数学的换算的结果是想等的?于是激起了我这个数学白痴的求知欲,证明可能吧严...
分类:
其他好文 时间:
2014-09-16 18:52:50
阅读次数:
264
请看下面的代码,最后alert出来的是什么呢? 1 var name = "Bob"; 2 var nameObj ={ 3 name : "Tom", 4 showName : function(){ 5 alert(this.name); 6 ...
分类:
编程语言 时间:
2014-09-16 15:37:40
阅读次数:
278
A New Stone GameTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 4177Accepted: 2227DescriptionAlice and Bob decide to play a new stone game.At...
分类:
其他好文 时间:
2014-09-16 02:41:29
阅读次数:
280
题目地址:POJ 1704
这个题实在巧妙。。居然这样就可以转化成了经典的nim模型。
这题可以从左往右两两配对,如果是奇数个的话,就让最左边的与0配对。然后每当对方移动某一对的前一个,你总可以移动该对的后一个来移动回来。所以这是没有影响的。有影响的只是每一对中间的空格数。这就转化成了((n+1)/2)堆石子的游戏,每一堆的石子个数是每一对点之间的空格数。然后用异或求解。
代码如下:
#i...
分类:
其他好文 时间:
2014-09-15 22:56:19
阅读次数:
270
找规律....
Abs Problem
Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge
Alice and Bob is playing a game, and this time the game is all about the absolute value!
Alice ...
分类:
其他好文 时间:
2014-09-11 22:28:12
阅读次数:
233
CARDSTime Limit:1000MSMemory Limit:10000KTotal Submissions:1448Accepted:773DescriptionAlice and Bob have a set of N cards labelled with numbers 1 ... ...
分类:
其他好文 时间:
2014-09-11 22:07:02
阅读次数:
183
he Himalayas
Time Limit: 2 Seconds Memory Limit: 65536 KB
As an artist, Bob usually need to travel around the world. He made a lot of sketch of scenery on his journey. A famous spot he ha...
分类:
其他好文 时间:
2014-09-09 12:48:18
阅读次数:
214
The 2014 ACM-ICPC Asia Mudanjiang Regional First Round - AThe HimalayasTime Limit: 2 Seconds Memory Limit: 65536 KBAs an artist, Bob usually need to t...
分类:
其他好文 时间:
2014-09-09 11:42:28
阅读次数:
332
【A】The HimalayasTime Limit: 2 Seconds Memory Limit: 65536 KBAs an artist, Bob usually need to travel around the world. He made a lot of sketch of s...
分类:
其他好文 时间:
2014-09-09 10:30:58
阅读次数:
230
题目链接题意:如图,Georgia和Bob在玩游戏。一个无限长的棋盘上有N个旗子,第i个棋子的位置可以用Pi表示。现在Georgia先走。每个人每一次可以把一枚棋子向左移动任意个格子,但是不能超越其他棋子,也不能和其他棋子处在同一个格子里。如果轮到某一个人的时候Ta再也不能移动棋子了,就判负。现在每...
分类:
其他好文 时间:
2014-09-08 00:57:36
阅读次数:
342