declarev_id tbl_regions.regions_id%type;beginfor v_i in 1..35 loopselect t.regions_id into v_id from tbl_regions t where t.regions_id=v_i;dbms_outpu.....
分类:
数据库 时间:
2014-11-07 18:40:17
阅读次数:
224
题意:将被‘X’包围的‘O’修改成'X'。
方法:从最外围的‘O’出发,找可连接的‘O’,则这些‘O’最终都是不要标记的,剩余的‘O’是需要标记的。这里可先将从外围‘O’可遍历到的‘O’标记为其他字符,最终再统一恢复。法2:也可从所有‘O’探索,只要无法探索到越界即满足,可以用一个栈保存这些中间节点。
具体实施:bfs(用dfs会爆栈RE。。。)
int dir[4][2]={-1,0,1,...
分类:
其他好文 时间:
2014-11-04 21:17:10
阅读次数:
201
Description
The official capital and the cultural capital of Berland are connected by a single road running through n regions. Each region has a unique climate, so the i-th (1?≤?i?≤?n) region
has...
分类:
其他好文 时间:
2014-11-04 17:33:03
阅读次数:
169
Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded region...
分类:
编程语言 时间:
2014-10-27 06:55:21
阅读次数:
213
Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded region...
分类:
其他好文 时间:
2014-10-24 23:36:15
阅读次数:
309
因官方Book Performance Tuning部分章节没有按配置项进行索引,不能达到快速查阅的效果。所以我以配置项驱动,重新整理了原文,并补充一些自己的理解,如有错误,欢迎指正。配置优化zookeeper.session.timeout 默认值:3分钟(180000ms) 说明:RegionS...
分类:
其他好文 时间:
2014-10-17 18:30:05
阅读次数:
248
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded ...
分类:
其他好文 时间:
2014-10-10 06:05:44
阅读次数:
238
Surrounded Regions
Total Accepted: 14948 Total
Submissions: 105121My Submissions
Given a 2D board containing 'X' and 'O',
capture all regions surrounded by 'X'.
A region is captured by...
分类:
其他好文 时间:
2014-10-09 01:20:38
阅读次数:
237
Problem Description
Think about a plane:
● One straight line can divide a plane into two regions.
● Two lines can divide a plane into at most four regions.
● Three lines can divide a plane int...
分类:
其他好文 时间:
2014-09-28 01:35:10
阅读次数:
361
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4675
题意:
二维平面内给出若干矩形,平面被矩形的边分为若干个区域,求一共有多少区域。
分析:
由于矩形只有50个,离散化后的平面大约是100*100的。不妨对于每个矩形覆盖...
分类:
其他好文 时间:
2014-09-26 02:36:08
阅读次数:
198