#lang scheme
( define nil '() )
( define ( root tree )( car tree ) )
( define ( left-tree tree )( cadr tree ) )
( define ( right-tree tree )( caddr tree ) )
( define ( height tree )
( con...
分类:
其他好文 时间:
2014-08-05 22:45:53
阅读次数:
244
1023. ButtonsTime limit: 2.0 secondMemory limit: 64 MBBackgroundAs you surely already know, Yekaterinburg has gotten its right to hold The Summer Olym...
分类:
其他好文 时间:
2014-08-05 22:17:20
阅读次数:
229
PHPMailer是一个用于发送电子邮件的PHP函数包。它提供的功能包括:在发送邮时指定多个收件人,抄送地址,暗送地址和回复地址、支持多种邮件编码包括:8bit,base64,binary和quoted-printable、支持SMTP验证、支持带附件的邮件和Html格式的邮件。实现代码 :isSM...
分类:
Web程序 时间:
2014-08-05 22:14:30
阅读次数:
281
对于一颗二叉树,可以根据先序遍历(后序遍历)和中序遍历重新还原出二叉树。
主要通过递归实现。
关键是找出对应左右子树的长度,之后传递先序遍历的开始节点、结束节点,中序遍历的开始节点、结束节点。
代码:
#include
using namespace std;
typedef struct tree{
int data;
struct tree *lchild;
struct ...
分类:
其他好文 时间:
2014-08-05 19:27:30
阅读次数:
224
lca。。。
排个序然后暴力保平安
_(:зゝ∠)_
#pragma comment(linker, "/STACK:102400000,102400000")
#include"cstdio"
#include"iostream"
#include"set"
#include"queue"
#include"string.h"
using namespace std;
#define...
分类:
其他好文 时间:
2014-08-05 19:25:00
阅读次数:
299
ext3.2 中的tree在IE中进行兼容性测试,遇到IE10时,无法点击,其他版本的IE(7、8、9、11)均正常。此bug是由于ext-all.js中的getAttributeNS方法不能兼容IE10出错引起的,下载了ext3.4,这里的getAttributeNS 被重写了,将3.4中的方法写...
分类:
其他好文 时间:
2014-08-05 18:52:29
阅读次数:
262
这题 是蛮特别的..虽然可以将R F转换为 0 1然后求最大子矩阵和 但是这个矩阵中 不能有0 即这个矩阵的元素都是1即F这题 一开始不会做啊=-= 看了discuss里面的人用了 left 和 right数组 还是一知半解 白痴啊=-=我把我的理解和porker讲了下 他纠正了我的错误... --...
分类:
其他好文 时间:
2014-08-05 18:40:49
阅读次数:
256
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4786
题意:有N个节点(1 5),M条边(0 5),其中一部分边被染成了黑色,剩下的边是白色,问能不能建立一棵树,树中有斐波那契数个白色边。
思路:用克鲁斯卡尔建三次树,第一是用所有边建树,判断是否能建成一棵树,第二次用黑边建树,最多可以用到x条黑边(不成环),n-1-x就是最少需要用的白边的数量,第...
分类:
其他好文 时间:
2014-08-05 11:22:59
阅读次数:
209
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The left subtree of a node contains only nodes with keys less than the node's key.Th...
分类:
其他好文 时间:
2014-08-05 09:43:39
阅读次数:
191