题目来源:POJ 2155 Matrix
题意:开始矩阵都是0 2种操作 把某个子矩阵翻转 0变1 1变0 查询x y 是0还是1
思路:树状数组 记录翻转次数就行 奇数次是1 偶数次是0
这题是区间更新 点查询 向上求和 向下更新 而且是二维的
#include
#include
using namespace std;
const int maxn = 1300;
i...
分类:
其他好文 时间:
2014-06-05 01:59:00
阅读次数:
287
1,建索引很简单,一行代码
g:/service/coreseek/bin/indexer -c g:/service/coreseek/etc/csft_mysql.conf person
前面是你bin目录下的indexer程序 后面-c指后面会跟配置文件 然后是配置文件地址 最好都用绝对地址 在后面是索引 也可以用--all 即对配置文件的所有部分都做索引
然后写成一个批处理文...
分类:
其他好文 时间:
2014-06-04 23:22:13
阅读次数:
256
BNUOJ 34981 A Matrix
题目地址:BNUOJ 34981
题意:
给你一个把一个排列放到矩阵里面的算法和矩阵,要你从矩阵写出排列。
如果答案有多个,输出翻转后字典序最大的那个。
分析:
想了半天只能想到链表版的,而且很可能TLE,看了帆神的题解后豁然开朗..Orz..
代码:
/*
* Author: illuz
*...
分类:
其他好文 时间:
2014-06-03 02:15:20
阅读次数:
187
【题目】
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the array.
【题意】
在“Search in Rotated Sorted Array”的基...
分类:
其他好文 时间:
2014-06-03 01:55:38
阅读次数:
173
【题目】
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be use...
分类:
其他好文 时间:
2014-06-03 01:07:58
阅读次数:
329
【题目】
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
【题意】
给定一个由0和1填充的二维矩阵,找一个全是1的最大矩形
【思路】
扫描二维矩阵,凡是扫到值为1的块时候,以当前块为矩形的左上角区块拓展,找最大矩阵。
先找出以每个“1”区块为左上角区块的最大矩形,然后求出最大全局的最大矩...
分类:
其他好文 时间:
2014-06-02 23:08:07
阅读次数:
289
DataMatrixFontandEncoder条形码控件使您能够以字体的形式来打印DataMatrix条形码。本产品可以在任何支持Java类库、.NET动态链接库或WindowsCOM动态链接库的操作系统上使用,并可以使用TrueType、BDF、FON、PCLLaserJetsoftfonts、PostScript(type1)Binary或者PostScriptASCII..
分类:
其他好文 时间:
2014-06-02 14:24:25
阅读次数:
208
Search Insert PositionTotal Accepted:15484Total
Submissions:44816Given a sorted array and a target value, return the index if
the target is found. If ...
分类:
其他好文 时间:
2014-06-02 02:06:39
阅读次数:
214
【题目】
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 1
\ / / / \ 3 2 1 ...
分类:
其他好文 时间:
2014-06-01 15:34:24
阅读次数:
231
【题目】
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 3 3 2 1
\ / / / \ ...
分类:
其他好文 时间:
2014-06-01 15:33:45
阅读次数:
297