Little BishopsA bishop is a piece used in the game of chess which is played on a board of square grids. A bishop can only move diagonally from its cur...
分类:
其他好文 时间:
2014-07-09 23:05:17
阅读次数:
252
HDU 1517 A Multiplication Game (博弈-求sg)
题目大意:
Stan 和 Ollie 两个人玩游戏, 一开始数字是 1,两个人轮流,Stan 先手,每个人选择 2~9 里面的一个一直乘以起初的数字,直到某个人乘到 这个数大于等于 n 就算赢,n给定,问你谁必然赢。
解题思路:
这题我没找出SG函数(必胜必输)的规律,只能用DP的方法求出每种状态的必胜必输状态。
2~9 ,依次其实可以用 2 3 5 7 这几个数得到,因此每个状态只需要记录2 3 5 7 这几个数的...
分类:
其他好文 时间:
2014-07-06 12:16:39
阅读次数:
234
One Person Game
Time Limit: 1 Second
Memory Limit: 32768 KB Special Judge
There is a very simple and interesting one-person game. You have 3 dice, namely
Die1, Die2 and Die3. Die1...
分类:
其他好文 时间:
2014-07-06 12:04:41
阅读次数:
167
Find the Marble
Time Limit: 2 Seconds
Memory Limit: 65536 KB
Alice and Bob are playing a game. This game is played with several identical pots and one marble. When the game starts, Alice...
分类:
其他好文 时间:
2014-07-06 11:35:34
阅读次数:
133
MAC OS X socket 1 [a simple example]
Server Code
C:
//
// main.c
// unix_socket_very_simple_server
//
// Created by DMD on 4/7/14.
/*
Function : Server for unix (OS X MAC)
*/
#include
#inclu...
分类:
其他好文 时间:
2014-07-06 11:33:27
阅读次数:
164
There are a bunch of different methods you can use to back up your MongoDB data, but if you want to avoid downtime and/or potential
performance degradation, the most common advice seems to be that y...
分类:
数据库 时间:
2014-07-06 09:26:04
阅读次数:
437
The Game
Description
One morning, you wake up and think: "I am such a good programmer. Why not make some money?'' So you decide to write a computer game.
The game takes place on a rectangular...
分类:
其他好文 时间:
2014-07-06 09:02:34
阅读次数:
287
Euclid's Game
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1880 Accepted Submission(s): 825
Problem Description
Two players, Stan...
分类:
其他好文 时间:
2014-07-06 00:02:49
阅读次数:
253
MAC OS X socket 2 [a simple example]
Xcode->New Workspace
XCode->New Project: C: [Add to : ?]
Server:
code
//
// main.c
// s2
// Server
// Created by DMD on 4/7/14.
#include
#include
#inc...
分类:
其他好文 时间:
2014-07-05 22:58:46
阅读次数:
327