zswx

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年2月9日

摘要: PHP教程:9个实用的PHP函数-PHP教程-网络编程-网页教学网PHP教程:9个实用的PHP函数(转帖)来自:http://www.webjx.com/php/2010-05-05/23609.html2010-05-05 07:11:39来源:芒果即使使用 PHP 多年,也会偶然发现一些未曾了解的函数和功能。其中有些是非常有用的,但没有得到充分利用。并不是所有人都会从头到尾一页一页地阅读手册和函数参考!1、任意参数数目的函数你可能已经知道,PHP 允许定义可选参数的函数。但也有完全允许任意数目的函数参数的方法。以下是可选参数的例子:// function with 2 optional a 阅读全文
posted @ 2012-02-09 22:24 zswx 阅读(292) 评论(0) 推荐(0) 编辑

2011年9月17日

摘要: // 最小树形图的朱刘算法// 临接表实现// 题目:poj3164// 时间复杂度,据说是O(VE)// 2011年9月15日//#include <iostream>#include <cstdio>#include <cmath>#include <memory.h>#define scale 110#define eps 1e-8using namespace std;struct Node { int to; double value; bool flag; Node * next;} array[scale*scale];int am 阅读全文
posted @ 2011-09-17 00:51 zswx 阅读(340) 评论(0) 推荐(0) 编辑

2011年8月20日

摘要: C. Bunstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLavrenty, a baker, is going to make several buns with stuffings and sell them.Lavrenty has n grams of dough as well as m different stuffing types. The stuffing types are numerated from 1 to m 阅读全文
posted @ 2011-08-20 12:18 zswx 阅读(375) 评论(0) 推荐(0) 编辑

2011年8月15日

摘要: 刚开始,没什么思路,后来才知道要用到polya定理,本来还以为是一道排列问题,最后却变成了一道群的轮换问题,最后由于数据非常大,又要mod除法运算,因此要求乘法逆元。polya定理 参考:http://www.docin.com/p-43391964.html http://www.cppblog.com/sdfond/archive/2010/02/06/107403.aspx http://hi.baidu.com/lewutian/blog/item/c75dff06c4693f6a03088100.htmlmod除法运算:http://wenku.baidu.com/view/6f28 阅读全文
posted @ 2011-08-15 13:04 zswx 阅读(399) 评论(0) 推荐(0) 编辑

2011年8月7日

摘要: 最近在学习一些图论的基本算法,上网查了下深搜,发现了这个网址写的不错:http://iprai.hust.edu.cn/icl2002/algorithm/algorithm/commonalg/graph/traversal/dfs.htm 阅读全文
posted @ 2011-08-07 22:05 zswx 阅读(187) 评论(0) 推荐(0) 编辑