problem:
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 resp...
分类:
其他好文 时间:
2015-04-02 15:05:20
阅读次数:
127
problem:
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is...
分类:
其他好文 时间:
2015-04-02 11:42:24
阅读次数:
188
0x001问题背景mysql上执行相关mysql命令(我们执行的是,showprocedurestatus)时提示mysql.proc表crashed,无法修复(markedascrashedandlast(automatic?)repairfailed)报错信息:mysqltableismarkedascrashedandlast(automatic?)repairfailed0x002分析处理mysql提供了检查和..
分类:
数据库 时间:
2015-04-02 06:49:20
阅读次数:
233
0x001问题背景mysql上执行相关mysql命令(我们执行的是,showprocedurestatus)时提示mysql.proc表crashed,无法修复(markedascrashedandlast(automatic?)repairfailed)报错信息:mysqltableismarkedascrashedandlast(automatic?)repairfailed0x002分析处理mysql提供了检查和..
分类:
数据库 时间:
2015-04-01 20:12:00
阅读次数:
239
2012. King
Constraints
Time Limit: 1 secs, Memory Limit: 256 MB , Special Judge
Description
There are n children in a country marked by integers from 1 to n.
They often fight wit...
分类:
其他好文 时间:
2015-03-30 09:19:57
阅读次数:
129
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 respectively
in the ...
分类:
其他好文 时间:
2015-03-28 01:17:37
阅读次数:
137
题意:给出包含n个节点的树,初始时节点1的父节点为1并被标记,再给出其他n-1个节点的父节点,Q次询问,M x表示把节点x标记;Q x表示找出离x最近的被标记的父节点的编号,最后输出所有标号之和。
思路:基础的并查集了,只不过这里要注意的是:寻找父节点时不要压缩路径。还要使用long long 。...
分类:
其他好文 时间:
2015-03-22 09:21:12
阅读次数:
423
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ...
分类:
其他好文 时间:
2015-03-20 16:02:09
阅读次数:
160
BasicsA template is a text document or a normal Python string, that is marked-up using the Django template language.A template can contain block tags ...
分类:
其他好文 时间:
2015-03-19 14:33:07
阅读次数:
212
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ...
分类:
其他好文 时间:
2015-03-17 23:32:49
阅读次数:
138