DP求解。对Blocks的先按照X降级,再按照Y降级排序,可以转化为最长公共子序列问题,即求子序列权值之和最大。
#include
#include
#include
using namespace std;
#define MAX_SIZE 300
struct Block{
int x;
int y;
int height;
};
int nums...
分类:
其他好文 时间:
2014-06-03 04:39:44
阅读次数:
223
时间,给了我们起点,从此,我们开始创造历史
世纪秒:2000年1月1日0时0分0秒到现在的秒数
datetime.h文件:
#ifnded _DATETIME_H_
#define _DATETIME_H_
typedef unsigned char z_u8;
typedef signed char z_...
分类:
其他好文 时间:
2014-06-03 04:08:08
阅读次数:
293
仲裁寄存器default值:
The default values of CPUARB, IDMAARB, SDMAARB, and UCARB are sufficient for most applications. These registers define priorities that are internal to the C66x CorePac. The MDMAARBU...
分类:
其他好文 时间:
2014-06-03 03:53:28
阅读次数:
239
三分查找:
#include
#define M 10
int main(void)
{
int front, near, mid1, mid2;
int n;
int found;
int a[M] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
front = 0;
near = M - 1;
found = 0;
printf("input n:");...
分类:
编程语言 时间:
2014-06-03 01:38:47
阅读次数:
399
typedef char status;
typedef char Telemtype;
#define NULL 0
#define OK 1
typedef struct bitnode{
Telemtype data;
struct bitnode *lchild,*rchild;
}bitnode,*bitree;
Creatbitree(bitree &t)
{
//先序创建二叉...
分类:
其他好文 时间:
2014-06-03 00:47:39
阅读次数:
195
并查集。需要考虑入度。 1 #include 2 #include 3 4 #define
MAXNUM 10005 5 6 int bin[MAXNUM]; 7 int degree[MAXNUM]; 8 int nums[MAXNUM]; 9 10
int find(int x) {11...
分类:
其他好文 时间:
2014-06-02 21:31:31
阅读次数:
219
如题
#define USE_AND_MASKS
#include
#include
#include
#include
#pragma config OSC = INTIO67 //internal oscillator
#pragma config WDT = OFF //watchdog timer off
#pragma config LVP = OFF...
分类:
其他好文 时间:
2014-06-01 11:16:04
阅读次数:
246
最近在代码中经常看到bind关键词,之前没用过啊,这里记录下。从微软复制过来的例子:
// Define the original function.
var checkNumericRange = function (value) {
if (typeof value !== 'number')
return false;
else
return...
分类:
编程语言 时间:
2014-06-01 04:51:27
阅读次数:
481
http://poj.org/problem?id=2891这道题的题意是:给你多个模性方程组:m mod ai=ri 求最小的m;中国剩余定理 1
#include 2 #include 3 #include 4 #define ll long long 5 using namespace ...
分类:
其他好文 时间:
2014-05-31 19:06:39
阅读次数:
191
题意:给你一些二进制的数,然后你可以选择按位取反,也可以不变,你只能选择一种,然后让你找出最大和最小,求最大的差值
思路:将取反与不取反都算出来,然后大的放一边,小的放一边,排序后判断#include
#include
#include
#include
#define ll long long
using namespace std;
const int MAXN = 100010;
...
分类:
移动开发 时间:
2014-05-31 17:44:07
阅读次数:
321