二叉树基本操作代码#include "stdafx.h"#include "stdlib.h"#include "string.h"#define MAX 100typedef char Elemtype;typedef struct BTNODE{ Elemtype data; BTN...
分类:
其他好文 时间:
2014-06-19 07:51:41
阅读次数:
251
在Linux C变成中用到MD5加密会使用到openssl库,下面给出的是一个简单的小Demo:#include #include #include #define MD5_LENGTH 16#define MAX 40int ...
分类:
编程语言 时间:
2014-06-19 06:23:35
阅读次数:
341
从文本1中寻找关键字的位置,然后获取关键字位置下三行数值,同时写进文本2中。先设两个字符串变量,一个用来读取行,一个用来写关键字值:char strTemp[MAX_PATH];char strFind[MAX_PATH];再设两个布尔变量,一个用来判断读取行成功,一个用来判断读取关键字值位置成功:...
分类:
其他好文 时间:
2014-06-18 22:33:16
阅读次数:
207
1 #include "iostream" 2 #include "windows.h" 3 #define MAX 0x7fffffff 4 using namespace std; 5 6 void merge(int s,int q,int e,int A[]){ 7 int i,...
分类:
其他好文 时间:
2014-06-18 21:52:18
阅读次数:
234
本示例使用比较函数,函数对象进行vector的排序与查找操作。#include #include using namespace std;#define MAX_NAME_LEN 32struct Student{ int no; char name[MAX_NAME...
分类:
其他好文 时间:
2014-06-18 21:14:11
阅读次数:
144
采用递归和三目表达式注意红色字体一定不能写成n-- 1 package com.hunag; 2 3 public class Sum { 4 5 static int sum; 6 public static int isum(int n) 7 { 8 ...
分类:
编程语言 时间:
2014-06-16 23:49:28
阅读次数:
456
在2013年7月13日前的版本。影响网站:所有dedecms版本漏洞页面plus/download.php漏洞脚本plus/download.php?open=1&arrs1[]=99&arrs1[]=102&arrs1[]=103&arrs1[]=95&arrs1[]=100&arrs1[]=98&arrs1[]=112&arrs1[]=114&arrs1[]=101&arrs..
分类:
其他好文 时间:
2014-06-16 17:50:04
阅读次数:
245
Given a binary tree containing digits from
0-9 only, each root-to-leaf path
could represent a number.
An example is the root-to-leaf path
1->2->3 which represents the number 123.
F...
分类:
其他好文 时间:
2014-06-15 14:51:02
阅读次数:
167
题目大意:有两颗苹果树,每一秒会有一颗掉落一个苹果(一共n秒),问在限制最多转换(从一颗走到另一颗)m次下最多能得到多少苹果。分析:dp[i][j][k]表示第i秒转换了j次当前在第k棵树下得到的苹果数最大值显然只与上一秒的状态有关dp[i][j][k]=max{dp[i-1][j][k],dp[i...
分类:
其他好文 时间:
2014-06-15 14:08:05
阅读次数:
216
C/C++怎样产生随机数:这里要用到的是rand()函数, srand()函数,C语言/C++里没有自带的random(int number)函数。 (1) 如果你只要产生随机数而不需要设定范围的话,你只要用rand()就可以了:rand()会返回一随机数值, 范围在0至RAND_MAX 间。RAN...
分类:
编程语言 时间:
2014-06-15 11:06:15
阅读次数:
254