Robot Motion
Problem Description
A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The...
分类:
其他好文 时间:
2014-05-15 05:48:40
阅读次数:
346
纯粹的模版。。。
学习模版总会是一个快乐的过程。。。。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int...
分类:
其他好文 时间:
2014-05-15 03:02:53
阅读次数:
275
转载自:http://my.oschina.net/orangef/blog/143790
如果需要在状态栏显示自定义的消息时,就需要自定义状态栏。
代码如下:
XYCustomStatusBar.h
01
#import
02
03...
分类:
移动开发 时间:
2014-05-15 03:00:20
阅读次数:
414
HDU 1561 The more ,The Better...
分类:
其他好文 时间:
2014-05-15 02:57:01
阅读次数:
182
OJ题目:click here~~
题目分析:n个[a b] 区间,对于i 属于[a b] ,从a开始,间隔c ,即i = a , i = a + c , i = a + 2*c …… 将x[ i ] 加1 ,x[ i ] 初值为0 。
已知最多只有一个x[ i ] 为奇数。找到这个i , 和这个奇数。
由于最多只有一个奇数,且奇数 + 偶数 = 奇数。用二分夹逼出这个奇数的位置。找到...
分类:
其他好文 时间:
2014-05-14 21:27:36
阅读次数:
176
http://acm.hdu.edu.cn/showproblem.php?pid=1224
基础的求最长路以及记录路径。感觉dijstra不及spfa好用,wa了两次。
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
#define...
分类:
其他好文 时间:
2014-05-14 20:59:54
阅读次数:
295
算了下复杂度好像是n^3 就感觉不大好做。结果n^31a。。。
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define eps 1e-9
#define PI acos(-1.0)
#define N 1005
#define inf ...
分类:
Web程序 时间:
2014-05-14 20:11:42
阅读次数:
309
Total Accepted: 8400 Total Submissions: 38235 My Submissions
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profi...
分类:
其他好文 时间:
2014-05-14 19:39:53
阅读次数:
275
划分树。只是考虑求当前区间大于第k值的值得和,和小于第k值的和。显然可以在查询的时候直接搞出来。sum[d][i]表示第d层子区间l,r种l-i的和。写错了一个下标,检查了半辈子。。。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define MP make_...
分类:
其他好文 时间:
2014-05-14 19:31:39
阅读次数:
311
首先确保mysql为5.5左右,太旧的版本,方法可能存在差异。1、利用mysql_install_db生成数据库mysql_install_db--datadir=/var/lib/mysql2--user=mysqlmysql_install_db--datadir=/var/lib/mysql3--user=mysql2、生成配置文件mysqld_multi--example3、修改配置文件:my.cnf[mysq..
分类:
数据库 时间:
2014-05-14 17:07:55
阅读次数:
417