锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久99精品国产麻豆宅宅,欧美综合天天夜夜久久,久久综合色老色http://m.shnenglu.com/aiest/zh-cnTue, 13 May 2025 12:42:51 GMTTue, 13 May 2025 12:42:51 GMT60- 浜屽弶鏍戠粨鏋?/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色综合久久免费|
久久精品国产免费|
久久久WWW成人免费毛片|
狠狠色综合网站久久久久久久高清
|
久久人人爽人人爽人人片AV高清|
久久久一本精品99久久精品88|
丁香久久婷婷国产午夜视频|
思思久久精品在热线热|
久久精品国产只有精品2020|
久久亚洲精品国产亚洲老地址|
99久久精品影院老鸭窝|
亚洲中文字幕久久精品无码喷水|
国产免费久久精品99久久|
亚洲AV日韩AV天堂久久|
人妻少妇精品久久|
国产毛片久久久久久国产毛片
|
无码人妻久久一区二区三区|
久久久精品久久久久久|
国产精品久久久久久|
久久久久久久97|
天天躁日日躁狠狠久久
|
亚洲日本久久久午夜精品|
青草影院天堂男人久久|
国产欧美久久一区二区|
人妻无码αv中文字幕久久
|
久久国产精品视频|
精品久久无码中文字幕|
亚洲精品乱码久久久久久中文字幕|
久久AAAA片一区二区|
亚洲人成精品久久久久|
中文字幕乱码久久午夜|
香蕉久久夜色精品国产2020|
久久久久久一区国产精品|
国产99久久久国产精免费|
亚洲国产成人久久精品影视|
国产精品成人久久久久三级午夜电影|
亚洲综合精品香蕉久久网97
|
久久无码av三级|
88久久精品无码一区二区毛片
|