锘??xml version="1.0" encoding="utf-8" standalone="yes"?>99久久精品免费看国产一区二区三区,国产精品VIDEOSSEX久久发布,久久精品国产亚洲AV无码麻豆http://www.shnenglu.com/aiest/zh-cnSun, 29 Jun 2025 09:10:59 GMTSun, 29 Jun 2025 09:10:59 GMT60- 浜屽弶鏍?wèi)缁撴?/title>http://www.shnenglu.com/aiest/archive/2006/05/12/6982.html鎴戠埍c++鎴戠埍c++Thu, 11 May 2006 22:46:00 GMThttp://www.shnenglu.com/aiest/archive/2006/05/12/6982.htmlhttp://www.shnenglu.com/aiest/comments/6982.htmlhttp://www.shnenglu.com/aiest/archive/2006/05/12/6982.html#Feedback0http://www.shnenglu.com/aiest/comments/commentRss/6982.htmlhttp://www.shnenglu.com/aiest/services/trackbacks/6982.html#include <iostream>
using namespace std;
typedef double DATA;
class bstree{
聽struct bnode{
聽聽DATA d;
聽聽bnode* left;
聽聽bnode* right;
聽聽bnode( const DATA& cd )
聽聽:d(cd), left(NULL), right(NULL)
聽聽{}
聽};
聽bnode* root;
聽int len;
聽bstree(const bstree& cb){}
聽bstree& operator=(const bstree& cb){return *this;}
聽void clear( bnode* & ptree ){
聽聽if( ptree==NULL )
聽聽聽return;
聽聽clear( ptree->left );
聽聽clear( ptree->right );
聽聽delete ptree;
聽聽ptree = NULL;
聽聽len--;
聽}
聽void insert( bnode* & ptree, bnode* np ){
聽聽if( ptree==NULL )
聽聽聽ptree = np;
聽聽else if( np->d < ptree->d )
聽聽聽insert( ptree->left, np );
聽聽else
聽聽聽insert( ptree->right, np );
聽}
聽void show( bnode* ptree ){
聽聽if( ptree==NULL )
聽聽聽return;
聽聽show( ptree->left );
聽聽cout << ptree->d << ' ';
聽聽show( ptree->right );
聽}
public:
聽bstree():len(0){ root=NULL; }
聽~bstree(){ clear(); }
聽void clear(){clear(root);}
聽void insert( const DATA& cd ){
聽聽insert( root, new bnode(cd) );
聽聽len++;
聽}
聽void show(){
聽聽show( root );
聽聽cout << endl;
聽}
聽int size(){ return len; }
聽bool empty(){ return root==NULL; }
};
int main()
{
聽bstree bs;
聽DATA d;
聽while( cin.peek()!='\n' ){
聽聽cin >> d;
聽聽bs.insert( d );
聽}
聽cout << bs.size() << " data:" << endl;
聽bs.show();
聽return 0;
}

]]>- 閾捐〃瓚呯簿褰?/title>http://www.shnenglu.com/aiest/archive/2006/05/10/6901.html鎴戠埍c++鎴戠埍c++Wed, 10 May 2006 15:28:00 GMThttp://www.shnenglu.com/aiest/archive/2006/05/10/6901.htmlhttp://www.shnenglu.com/aiest/comments/6901.htmlhttp://www.shnenglu.com/aiest/archive/2006/05/10/6901.html#Feedback1http://www.shnenglu.com/aiest/comments/commentRss/6901.htmlhttp://www.shnenglu.com/aiest/services/trackbacks/6901.html
using namespace std;
typedef int DATA;
const unsigned npos=(unsigned)-1;
class clink{
struct node{
DATA d;
node* next;
node( const DATA& cd )
:d(cd), next(NULL)
{}
};
node* head;
int len;
public:
clink():head(NULL),len(0){}
~clink(){
clear();
}
node* & getp( unsigned pos ){
if( pos==0 || head==NULL )
return head;
node* p = head;
for( int i=1; inext )
p = p->next;
else
break;
}
return p->next;
}
void insert( const DATA& cd, unsigned pos=0 ){
node* & lp = getp( pos );
node* np = new node( cd );
np->next = lp;
lp = np;
len++;
}
friend ostream& operator<<( ostream& os, const clink& cc )
{
os << "{ ";
node* p = cc.head;
while( p ){
os << p->d << ' ';
p = p->next;
}
os << "} ";
return os;
}
unsigned find( const DATA& cd ){
node* p = head;
unsigned pos=0;
while( p ){
if( p->d==cd )
return pos;
pos++;
p = p->next;
}
return npos;
}
bool update( const DATA& d1, const DATA& d2 ){
unsigned pos=find( d1 );
node* p;
if( pos==npos )
return false;
p = getp( pos );
p->d = d2;
return true;
}
bool erase( const DATA& cd ){
unsigned pos=find( cd );
node* p;
if( pos==npos )
return false;
node* & lp = getp( pos );
p = lp;
lp = lp->next;
delete p;
len--;
return true;
}
int size(){ return len; }
bool empty(){ return head==NULL; }
void clear(){
node* p;
while( head ){
p = head->next;
delete head;
head = p;
}
len = 0;
}
};
int main()
{
clink ol;
cout << ol << endl;
ol.insert( 10 );
ol.insert( 20, npos );
ol.insert( 30, 0 );
ol.insert( 40 );
ol.insert( 50, 1 );
cout << ol << endl;
DATA d;
cout << "input a DATA for search:" << endl;
cin >> d;
unsigned pos=ol.find( d );
if( pos==(unsigned)-1 )
cout << "not found!" << endl;
else
cout << "found at " << pos << endl;
DATA nd;
for( int i=0; i<3; i++ ){
cout << "input old data and new data:\n";
cin >> d >> nd;
ol.update( d, nd );
cout << ol << endl;
}
for( int i=0; i<3; i++ ){
cout << "input a data to remove:" << endl;
cin >> d;
ol.erase( d );
cout << ol.size() << ol << endl;
}
cout << "is empty?" << ol.empty() << endl;
ol.clear();
cout << "is empty?" << ol.empty() << endl;
cout << ol.size() << ol << endl;
return 0;
}

]]> - 杈撳叆騫存湀鏃ュ緱鍒板綋鏃ョ殑鏄熸湡http://www.shnenglu.com/aiest/archive/2006/05/10/6849.html鎴戠埍c++鎴戠埍c++Tue, 09 May 2006 23:39:00 GMThttp://www.shnenglu.com/aiest/archive/2006/05/10/6849.htmlhttp://www.shnenglu.com/aiest/comments/6849.htmlhttp://www.shnenglu.com/aiest/archive/2006/05/10/6849.html#Feedback0http://www.shnenglu.com/aiest/comments/commentRss/6849.htmlhttp://www.shnenglu.com/aiest/services/trackbacks/6849.html
#include<iostream> int聽nian(int聽year); int聽yue(int聽year,int聽month); using聽namespace聽std; //------------------------------- void聽main() { 聽聽聽聽 聽聽聽聽聽聽聽聽int聽year,month,day,sum,pp; char聽x; cout<<"Please聽input聽a聽day:year/month/day!"; cin>>year>>x>>month>>x>>day; sum=nian(year)+yue(year,month)+day; pp=sum%7;
switch(pp) { case聽0: 聽聽聽聽cout<<"Sunday"<<endl; 聽聽聽聽break; case聽1: 聽聽聽聽cout<<"Monday"<<endl; 聽聽聽聽break; case聽2:cout<<"Tuesday"<<endl; 聽聽聽聽break; case聽3:cout<<"Wednesday"<<endl; 聽聽聽聽break; case聽4:cout<<"Thursday"<<endl; 聽聽聽聽break; case聽5:cout<<"Fiday"<<endl; 聽聽聽聽break; case聽6:cout<<"Saturday"<<endl; 聽聽聽聽break;
} } //-------------------------------------------
int聽nian(int聽year) { int聽i,sum_year=0; for(i=1;i<year;i++) { if((i%4==0&&i%100!=0)||(i%400==0)) sum_year+=366; else sum_year+=365; } return聽(sum_year); } //------------------------------------------- int聽yue(int聽year,int聽month) {int聽yue1,day1; yue1=month-1; if((year%4==0&&year%100!=0)||(year%400==0)) { switch(yue1) { case聽1:day1=31;break; case聽2:day1=31+29;break; case聽3:day1=31+29+31;break; case聽4:day1=31+29+31+30;break; case聽5:day1=31+29+31+30+31;break; case聽6:day1=31+29+31+30+31+30;break; case聽7:day1=31+29+31+30+31+30+31;break; case聽8:day1=31+29+31+30+31+30+31+31;break; case聽9:day1=31+29+31+30+31+30+31+31+30;break; case聽10:day1=31+29+31+30+31+30+31+31+30+31;break; case聽11:day1=31+29+31+30+31+30+31+31+30+31+30;break; case聽12:day1=31+29+31+30+31+30+31+31+30+31+30+31;break; } } else { switch(yue1) { case聽1:day1=31;break; case聽2:day1=31+28;break; case聽3:day1=31+28+31;break; case聽4:day1=31+28+31+30;break; case聽5:day1=31+28+31+30+31;break; case聽6:day1=31+28+31+30+31+30;break; case聽7:day1=31+28+31+30+31+30+31;break; case聽8:day1=31+28+31+30+31+30+31+31;break; case聽9:day1=31+28+31+30+31+30+31+31+30;break; case聽10:day1=31+28+31+30+31+30+31+31+30+31;break; case聽11:day1=31+28+31+30+31+30+31+31+30+31+30;break; case聽12:day1=31+28+31+30+31+30+31+31+30+31+30+31;break; } }
return聽(day1); } |

]]>
91精品国产91热久久久久福利
|
99久久中文字幕|
久久久国产精品亚洲一区|
日韩乱码人妻无码中文字幕久久|
色欲久久久天天天综合网|
久久青青草原国产精品免费|
亚洲欧美日韩精品久久|
久久人人爽人人爽人人爽|
日韩精品久久久久久|
久久www免费人成看片|
99久久综合国产精品二区|
亚洲AV无码一区东京热久久|
久久国产香蕉一区精品|
久久精品国产亚洲AV无码娇色|
久久九九免费高清视频
|
韩国三级中文字幕hd久久精品|
久久精品国产欧美日韩99热|
国产精品内射久久久久欢欢|
人妻精品久久久久中文字幕69|
亚洲国产成人久久一区久久|
国产精品久久久久久久久免费|
国产精品久久久久免费a∨|
国产福利电影一区二区三区久久久久成人精品综合|
久久人人爽人人爽人人片AV麻豆|
久久99国产精品久久久|
久久精品国产亚洲AV高清热|
久久精品国产亚洲AV久|
亚洲欧洲久久久精品|
日韩精品无码久久一区二区三|
精品久久综合1区2区3区激情|
久久最近最新中文字幕大全|
99久久精品影院老鸭窝|
精品免费tv久久久久久久|
久久国产热精品波多野结衣AV|
亚洲成色WWW久久网站|
国内精品综合久久久40p|
亚洲中文字幕无码久久2017|
狠狠色丁香婷婷久久综合五月
|
久久这里有精品|
久久精品无码一区二区WWW|
亚洲AV无码1区2区久久|