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
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:
其他好文 时间:
2014-07-08 23:54:39
阅读次数:
407
http://en.wikipedia.org/wiki/Order-independent_transparencyOrder-independent transparencyFrom Wikipedia, the free encyclopediaThe importance of blendi...
分类:
其他好文 时间:
2014-07-08 23:42:14
阅读次数:
355
Description
Imagine you are standing inside a two-dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south, east or west one cell at a step. T...
分类:
其他好文 时间:
2014-07-08 21:04:29
阅读次数:
347
Description
Let’s play a puzzle using eight cubes placed on a 3 × 3 board leaving one empty square.
Faces of cubes are painted with three colors. As a puzzle step, you can roll one of the cubes ...
分类:
其他好文 时间:
2014-07-08 16:27:42
阅读次数:
220
在Linux编译gcc时,遇到编译错误,究其根源是因为内存不足,这时通过修改swap大小解决了问题相关操作如下:1. 查看当前分区情况free -m 2. 增加 swap 大小, 2G 左右dd if=/dev/zero of=/var/swap bs=1024 count=2048000 3......
分类:
系统相关 时间:
2014-07-06 13:30:21
阅读次数:
226
题目链接:uva 11246 - K-Multiple Free set
题目大意:给定n,k。求一个元素不大于n的子集,要求该子集的元素尽量多,并且不含两个数满足a?k=b.
解题思路:容斥原理,f(i)=(?1)inki,取f函数的和即可。
#include
#include
#include
using namespace std;
typedef long long ...
分类:
其他好文 时间:
2014-07-06 09:58:18
阅读次数:
177
1、TTS 就是 Text to Speech ,把文本内容变为语音。 谷歌在Android 1.6 开始就支持TTS 了,但是可惜,只是支持英语法语德语等五种语言,唯独丫丫的木有我们中文。 所以,我们只能另外自己开发中文语音包程序。
目前主要有以下几种中文TTS 。
(1)开源项目 eyes-free ,链接是: http://code.google.com/p/eyes-fr...
分类:
移动开发 时间:
2014-07-06 08:14:52
阅读次数:
946
题目链接:uva 1426 - Discrete Square Roots
题目大意:给出X,N,R,求出所有满足的r,使得r2≡x%N,并且R是一个其中的解。
解题思路:
R2?r2=k?N(R?r)(R+r)=k?N=> aA=(R+r),bB=(R?r),A,B为N的因子
所以枚举A,B,就有r=R?aA=bB?RaA+bB=2?R
拓展欧几里得求解,将所有满足的解放入...
分类:
其他好文 时间:
2014-07-06 00:11:14
阅读次数:
268