题目:DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater loca...
分类:
其他好文 时间:
2015-05-13 06:03:23
阅读次数:
118
Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can recover many numbers such like 32-321-3214-0229-8...
分类:
其他好文 时间:
2015-05-10 06:23:02
阅读次数:
159
戳这里:1574题意:从一个长度为n的数字里去掉任意一个数字,求第k大的数字为多少。官方题解:去掉Ri后剩下的数字,显然要么比去掉任意的Rj(j > i)的方案大,要么比去掉任意的Rj小。 所以先从后向前扫一遍预处理出去掉Ri后是比后面的都大还是都小。 然后分治之。whu邀请赛的 A 题,当时没想出...
分类:
其他好文 时间:
2015-05-08 23:22:46
阅读次数:
142
Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id....
分类:
其他好文 时间:
2015-05-02 09:48:14
阅读次数:
118
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 5364
Accepted: 1456
Description
Given a number of distinct decimal digits, you can form one integer by choosing a non-...
分类:
其他好文 时间:
2015-04-22 15:16:23
阅读次数:
143
Discription:Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. 删除重....
分类:
其他好文 时间:
2015-04-19 22:37:26
阅读次数:
370
Problem
A certain forest consists of N trees, each of which is inhabited by a squirrel.
The boundary of the forest is the convex polygon of smallest area which contains every tree, as if a giant r...
分类:
其他好文 时间:
2015-04-18 19:14:41
阅读次数:
169
题目SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id.
Id
Email 1
john@example.com
2
bob@example.com
3
john@examp...
分类:
其他好文 时间:
2015-04-17 11:25:03
阅读次数:
100
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: next() and has...
分类:
其他好文 时间:
2015-04-16 17:45:41
阅读次数:
151
暴搜一下就行了,确实也没法优化什么。 不过枚举一半,另一半用next_permutation()函数应该是会快一些的。
#include
#include
#include
#include
#include
#include
using namespace std;
int T,a[20],n,vis[20],tot;
int A[20],B;
void dfs(int cur) {
...
分类:
其他好文 时间:
2015-04-14 16:44:14
阅读次数:
141