近日开始学习C大中高级应用,并配套一些练习.感觉上还不错.
  就是觉得在书写工程程序时,对多个文件大分配总是不大了解.或者总是会遇到很多问题.例如变量声明和适用范围等.
  
  
  
  
      我想和那个电脑高手共同建一个游戏网站,有兴趣的可以和QQ809465198联系。
  
  
  
  
      我是一名刚学vb6.0的学生,我想找一名老师。
和QQ:809465198联系。
  
  
  
  
          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)&#...
  
  
  
  
      这道题是最长上升序列。
 
由于给出的数据量过大,不能直接使用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]小的最大的元素...
  
  
  
  
      
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)没办法优化,但是在空间上是可以优化的。可以...
  
  
  
  
      不愧是宫崎骏,真是无懈可击哦~http://hi.bc-cn.net/attachment/200808/18/33730_1219038341lRRM.jpg把扩展名改成torrent就可以了刚刚看了《猫的报恩》真是有趣,要是好莱坞迪斯尼能够向宫崎骏学习1/1000000就好了...白猫居然叫"小雪"啊,居然是yuki啊,居然是"有希"啊...小心不要被凉宫强过去做团员哦...
  
  
  
  
      
  
  
  
  
      我浏览这个网站已经快4年了,非常喜欢这里。
今天在这里开了博客,正式在这里安个家。
  
  
  
  
      真正学习 .NET编程也就是那个多月,暑假自己用VS2005 和 ACEESS做了个博客,呵呵给老师看了哈哈,夸奖我哈心里那个。。。呵呵感觉越来越喜欢它了!本很想发到网上区给大家看看好哈,可是找不到支持VS2005 和 ACEESS的免费的域名空间!那更。。。。。唉!不过动手后感觉真的又好多东西要学习,没又你做不到个只有你想不到的,在说又这么多感受朋友能不行吗?呵呵!
  
  
  
  
      本人是新手,希望有师傅指教~!
  
  
  
  
      //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...
  
  
  
  
      //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;   ...
  
  
  
  
      //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>::...
  
  
  
  
      #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...
  
  
  
  
      //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...
  
  
  
  
      #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'), ...
  
  
  
  
      //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);     ...
  
  
  
  
      #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...
  
  
  
  
      
你不能决定生命的长度,但你可以改变它的宽度。
你不能改变天生的容貌,但你可以随时展现笑容。
你不能企望控制他人,但你可以好好把握自己。
你不能全然预知明天,但你可以好好把握今天。
你不能要求事事顺利,但你可以做到事事尽心。