锘??xml version="1.0" encoding="utf-8" standalone="yes"?>99久久精品免费看国产一区二区三区,国产精品VIDEOSSEX久久发布,久久精品国产亚洲AV无码麻豆http://m.shnenglu.com/aiest/zh-cnSun, 29 Jun 2025 09:10:59 GMTSun, 29 Jun 2025 09:10:59 GMT60- 浜屽弶鏍?wèi)缁撴?/title>http://m.shnenglu.com/aiest/archive/2006/05/12/6982.html鎴戠埍c++鎴戠埍c++Thu, 11 May 2006 22:46:00 GMThttp://m.shnenglu.com/aiest/archive/2006/05/12/6982.htmlhttp://m.shnenglu.com/aiest/comments/6982.htmlhttp://m.shnenglu.com/aiest/archive/2006/05/12/6982.html#Feedback0http://m.shnenglu.com/aiest/comments/commentRss/6982.htmlhttp://m.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://m.shnenglu.com/aiest/archive/2006/05/10/6901.html鎴戠埍c++鎴戠埍c++Wed, 10 May 2006 15:28:00 GMThttp://m.shnenglu.com/aiest/archive/2006/05/10/6901.htmlhttp://m.shnenglu.com/aiest/comments/6901.htmlhttp://m.shnenglu.com/aiest/archive/2006/05/10/6901.html#Feedback1http://m.shnenglu.com/aiest/comments/commentRss/6901.htmlhttp://m.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://m.shnenglu.com/aiest/archive/2006/05/10/6849.html鎴戠埍c++鎴戠埍c++Tue, 09 May 2006 23:39:00 GMThttp://m.shnenglu.com/aiest/archive/2006/05/10/6849.htmlhttp://m.shnenglu.com/aiest/comments/6849.htmlhttp://m.shnenglu.com/aiest/archive/2006/05/10/6849.html#Feedback0http://m.shnenglu.com/aiest/comments/commentRss/6849.htmlhttp://m.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亚洲人成电影网站|
久久电影网一区|
欧美亚洲国产精品久久蜜芽|
久久久久噜噜噜亚洲熟女综合|
日韩中文久久|
久久精品中文无码资源站|
久久精品国产99久久久|
久久伊人精品青青草原高清|
久久夜色精品国产|
嫩草伊人久久精品少妇AV|
亚洲一本综合久久|
精品久久久久久久久免费影院|
色婷婷综合久久久久中文|
香蕉久久夜色精品国产小说|
中文精品99久久国产|
色成年激情久久综合|
伊人久久一区二区三区无码|
色综合久久久久|
99久久99久久精品国产片果冻|
国产精品亚洲综合专区片高清久久久|
无码国内精品久久综合88|
伊人久久综在合线亚洲2019|
亚洲人成精品久久久久|
久久中文精品无码中文字幕|
91精品国产乱码久久久久久
|
午夜精品久久久久久久无码|
久久久久久午夜成人影院|
性做久久久久久久久老女人|
…久久精品99久久香蕉国产
|
久久精品国内一区二区三区|
亚洲色大成网站WWW久久九九|
免费精品久久久久久中文字幕
|
亚洲?V乱码久久精品蜜桃|
亚洲天堂久久精品|
久久国产亚洲精品无码|
日韩精品久久久久久久电影蜜臀|
一级做a爰片久久毛片看看
|
99国内精品久久久久久久|
久久99国产乱子伦精品免费|
欧美丰满熟妇BBB久久久|