http://acm.hdu.edu.cn/showproblem.php?pid=3038
1 #include 2 #include 3 #include 4 #define maxn 600000 5 using namespace std; 6
7 int f[maxn],d[max...
分类:
其他好文 时间:
2014-05-19 18:51:33
阅读次数:
252
//#define LOCAL#include#includeusing namespace
std;int const MAX_N=100001;int const INF=10000000;int N,M,x[MAX_N];void init(){
for(int i=0;i1) {...
分类:
其他好文 时间:
2014-05-19 17:20:45
阅读次数:
204
//#define LOCAL#include#include#include#includeint
const MAX_N=101;typedef struct Point{ int x,y; bool operatorVec[i].y) { ...
分类:
其他好文 时间:
2014-05-19 17:08:45
阅读次数:
253
题目描述
输入二叉树的先序遍历序列和中序遍历序列,输出该二叉树的后序遍历序列。
输入
第一行输入二叉树的先序遍历序列;
第二行输入二叉树的中序遍历序列。
输出
输出该二叉树的后序遍历序列。
示例输入
ABDCEF
BDAECF
示例输出
DBEFCA#include
#include
#define MAX 50+3
using namespace std;
typede...
分类:
其他好文 时间:
2014-05-18 15:59:41
阅读次数:
185
个人认为重点写出max_heapify和parent_heapify两个函数即可,这个版本内存管理的功能显得特别简单:
#include
#include
using namespace std;
class Heap {
public:
int size, capacity;
int *ele;
void max_heapify(int i,int heap[],int len...
分类:
其他好文 时间:
2014-05-18 15:15:29
阅读次数:
220
字符串
基本字符串操作
字符串也是序列,因此序列的基本操作(索引、分片、连接、乘法、长度、求最大值和最小值、成员资格)对字符串同样适用:
索引
>>> 'a_string'[0]
'a'
长度
>>> len('a_string')
8
求最大值
>>> max('a_string')
't'
求最小值
>>> min('a_string')
'_'
乘法
>>> ...
分类:
编程语言 时间:
2014-05-18 10:50:15
阅读次数:
325
模型主要可以以两种方式进行输出:
(1)使用插件进行输出。并输出为指定的文件格式,如FBX或OBJ
(2)直接输出为响应的3D应用文件,如.max或者Blen,Unity自身再进行转换。
使用3D软件包自身格式进行输出的优缺点:
优点:(1)快速的输出工程,直接从3D文件到Unity
(2)简单的初始化过程
缺点:(1)文件中可能会包括不需要的数据。
...
分类:
其他好文 时间:
2014-05-18 06:42:00
阅读次数:
253
#include
#define MAX_TASKS 2 //任务槽个数.必须和实际任务数一至
#define MAX_TASK_DEP 12 //最大栈深.最低不得少于2 个,保守值为12.
unsigned char idata task_stack[MAX_TASKS][MAX_TASK_DEP];//任务堆栈.
unsigned char idata task_sp[MA...
分类:
其他好文 时间:
2014-05-18 05:12:43
阅读次数:
339
题目一:求1!+2!+…..+n! 的和的后6位,(注意n的范围)
#include
using namespace std;
const int MAX = 1000000;
int getResu(int n)
{
int sum=0;
int temp= 1;
for(int i=1; i <= n; i++)
{
temp *= i;
temp %= MAX;
...
分类:
其他好文 时间:
2014-05-18 03:36:19
阅读次数:
223
题目:
链接:点击打开链接
算法:
二维的完全背包;
思路:
状态转移方程:dp[j][m] = max(dp[j][m],dp[j-b[i]][m-1]+a[i]);表示用j的忍耐度杀死m个怪兽能够得到的最大的经验值。
代码:
#include
#include
#include
using namespace std;
int dp[110][110];...
分类:
其他好文 时间:
2014-05-18 03:05:42
阅读次数:
338