建站

我想和那个电脑高手共同建一个游戏网站,有兴趣的可以和QQ809465198联系。
jintao 发布于 2008-08-19 18:46 | 阅读 1635 次 | 评论 0 条

找老师

我是一名刚学vb6.0的学生,我想找一名老师。 和QQ:809465198联系。
jintao 发布于 2008-08-19 18:09 | 阅读 3327 次 | 评论 0 条

[经验]TCP,UDP完整数据包校验和通用计算

    ICMP,IP,UDP,TCP报头部分都有checksum(检验和)字段。ICMP和IP报头校验和的计算都很简单,使用RFC1071中给出的方法即可完成(如下)。   //计算校验和USHORT checksum(USHORT *buffer,int size){ unsigned long cksum=0; while(size>1) {  cksum+=*buffer++;  size-=sizeof(USHORT); } if(size)&#...
redice 发布于 2008-08-19 12:02 | 阅读 35337 次 | 评论 2 条

pku(1631) Bridging signals

这道题是最长上升序列。 由于给出的数据量过大,不能直接使用dp的方法来去最长升序,因为这样的时间为0(n^2) 下面我们考虑如下的情况: 对于第i个数来说他是否是1……i的最长上升序列的元素,就是在1……i-1中的最长上升序列最后一个值比f[i]小,那么f[i]元素就为1……i上的最长上升序列的元素。 如过不存在1……i-1的最长上升序列满足上述情况时,我们不能直接认为i就1……n上的最长升序列。这是我们可以这样的假设,假设f[i]是1……n的最长生序列的元素。那么f[i]在1……n的最长升序列的位置应该在1……i-1的最长生序列中比f[i]小的最大的元素...
keloy 发布于 2008-08-18 23:08 | 阅读 7126 次 | 评论 0 条

背包问题的总结

01背包问题; 有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使价值总和最大。 这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。 用子问题定义状态:即f[i][v]表示前i件物品恰放入一个容量为v的背包可以获得的最大价值。则其状态转移方程便是: F[i][v]=max{f[i-1][v],f[i][v-c[i]]+w[i]};f[i-1][v-c[i]]+w[i]表示在第i-1个背包在v-c[i]的容量下的价值+第i件物品的价钱。 在背包问题中,时间为O(NV)没办法优化,但是在空间上是可以优化的。可以...
keloy 发布于 2008-08-18 19:00 | 阅读 7288 次 | 评论 0 条

宫崎骏的《悬崖上的金鱼姬》可以下到了^^

不愧是宫崎骏,真是无懈可击哦~http://hi.bc-cn.net/attachment/200808/18/33730_1219038341lRRM.jpg把扩展名改成torrent就可以了刚刚看了《猫的报恩》真是有趣,要是好莱坞迪斯尼能够向宫崎骏学习1/1000000就好了...白猫居然叫"小雪"啊,居然是yuki啊,居然是"有希"啊...小心不要被凉宫强过去做团员哦...
snakealpha 发布于 2008-08-18 13:49 | 阅读 3004 次 | 评论 0 条

北京奥运会的“美人计”

liyitao 发布于 2008-08-18 10:48 | 阅读 3030 次 | 评论 0 条

报到

我浏览这个网站已经快4年了,非常喜欢这里。 今天在这里开了博客,正式在这里安个家。
liqiangzk982 发布于 2008-08-17 19:34 | 阅读 2347 次 | 评论 0 条

学习编程感受!

真正学习 .NET编程也就是那个多月,暑假自己用VS2005 和 ACEESS做了个博客,呵呵给老师看了哈哈,夸奖我哈心里那个。。。呵呵感觉越来越喜欢它了!本很想发到网上区给大家看看好哈,可是找不到支持VS2005 和 ACEESS的免费的域名空间!那更。。。。。唉!不过动手后感觉真的又好多东西要学习,没又你做不到个只有你想不到的,在说又这么多感受朋友能不行吗?呵呵!
吴胜 发布于 2008-08-17 18:37 | 阅读 6032 次 | 评论 0 条

求教!~~

本人是新手,希望有师傅指教~!
asd5620 发布于 2008-08-17 17:05 | 阅读 328 次 | 评论 1 条

map && multimap

//the usage of multimap is as same as the map #include<iostream>#include<map>#include<string>using namespace std;typedef map<int,string> MAP_INT_STR;typedef pair<int,string> PAIR_INT_STR;template<typename ITERATOR>void print_map_item(ITERATOR it){ cout<<(*it).first<<","<<(*it).second<<endl;}i...
zjl138 发布于 2008-08-17 14:34 | 阅读 4455 次 | 评论 0 条

construct map &amp;&amp; multimap

//map's constructor,and the multimap's constructor is as some as the map's#include<iostream>#include<map>#include<iterator>using namespace std;int main(void){ typedef pair<int,int> Int_Pair; map<int,int>::iterator Iter; map<int,int> map1; //empty map map<int,int,less<int> > map2; ...
zjl138 发布于 2008-08-17 14:30 | 阅读 4522 次 | 评论 0 条

Multiset

//multiset #include<iostream>#include<set>#include<algorithm>using namespace std;int main(void){ multiset<int> mul1; //default constructor int arr[] = {0,0,1,1,2,3,4,5}; multiset<int> mul2(arr,arr+8); multiset<int> mul3(mul2); multiset<int>::iterator Iter; multiset<int>::...
zjl138 发布于 2008-08-17 14:28 | 阅读 4173 次 | 评论 0 条

Set

#include<iostream>#include<set>using namespace std;int main(void){ set<int> s1; int arr[] = {0,0,0,0,1,1,2,3}; set<int> s2(arr,arr+8); //construct from a range set<int> s3(s2); set<int>::iterator Iter; set<int>::reverse_iterator RevIter; if (s1.empty()) cout<<"set s1 is em...
zjl138 发布于 2008-08-17 14:26 | 阅读 4114 次 | 评论 0 条

construct Set &amp;&amp; Multiset

//set//multiset's constructor is as same as the set#include<iostream>#include<set>using namespace std;int main(void){ set<int>::iterator Iter; //set<int>::iterator s1_Iter,s2_Iter,s3_Iter,s4_Iter,s5_Iter,s6_Iter; set<int> s0; //create an empty set s0 of key type integer set<int,less...
zjl138 发布于 2008-08-17 14:24 | 阅读 5104 次 | 评论 0 条

List

#include<iostream>#include<list>#include<algorithm>using namespace std;int main(void){ list<int> c1,c2,c3,c4; list<int>::iterator c1_Iter,c2_Iter,c3_Iter,w_Iter,f_Iter,l_Iter; c1.push_back(10),c1.push_back(10), c1.push_back(20), c1.push_back(30); c2.push_back('u'), c2.push_back('a'), ...
zjl138 发布于 2008-08-17 14:21 | 阅读 3990 次 | 评论 0 条

Deque

//Deque(dounle_ended queues] #include<iostream>#include<deque>#include<string>#include<iterator>#include<algorithm>using namespace std;int main(void){ deque<int> c1; //defauilt constructor deque<int> c2(10,4); //create a deque with 10 copies of 4 deque<int> c3(c2); ...
zjl138 发布于 2008-08-17 14:16 | 阅读 3680 次 | 评论 0 条

Vector

#include<iostream>#include<vector>#include<algorithm>#include<iterator>using namespace std;void Pause(){ char c; cout<<"\npress return to continue: "; cin.get(c); cout<<endl;}int main(){ vector<int> v(10,0); ostream_iterator<int> out(cout," "); //定义一个输出迭代器 copy(v.begin(),v.e...
zjl138 发布于 2008-08-17 14:12 | 阅读 3554 次 | 评论 0 条

接受不能改变的

你不能决定生命的长度,但你可以改变它的宽度。 你不能改变天生的容貌,但你可以随时展现笑容。 你不能企望控制他人,但你可以好好把握自己。 你不能全然预知明天,但你可以好好把握今天。 你不能要求事事顺利,但你可以做到事事尽心。
hackerjiang 发布于 2008-08-17 12:01 | 阅读 2964 次 | 评论 0 条

自己实现的string类

#ifndef STRING_H#define STRING_H#include<iostream>using namespace std; class String{ friend ostream&amp;operator<<(ostream&amp; os,String&amp; str) { os<<str.m_data; return os; } public: String(const char* str=NULL); String(const String&amp; str); int size(const String&amp; str); Strin...
vv12vv12 发布于 2008-08-17 10:40 | 阅读 3636 次 | 评论 0 条