锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久国产精品一国产精品金尊
,久久精品免费观看,久久久久久综合一区中文字幕
http://m.shnenglu.com/aiest/zh-cnSat, 05 Jul 2025 16:33:09 GMTSat, 05 Jul 2025 16:33:09 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); } |

]]>
久久国产免费直播|
久久久久久免费一区二区三区|
热综合一本伊人久久精品|
欧美午夜A∨大片久久|
无码国内精品久久人妻蜜桃
|
国产一区二区久久久|
精品伊人久久大线蕉色首页|
99久久精品国产高清一区二区|
99久久成人18免费网站|
精品久久久久久国产|
色综合久久久久|
亚洲AV无码久久精品狠狠爱浪潮|
欧美久久精品一级c片片|
亚洲精品第一综合99久久|
97r久久精品国产99国产精|
亚洲精品无码久久久|
久久se这里只有精品|
国内精品伊人久久久久AV影院|
亚洲国产小视频精品久久久三级|
久久综合九色综合精品|
人妻无码αv中文字幕久久|
亚洲国产精品狼友中文久久久
|
精品久久久久久无码中文字幕|
久久综合给合久久国产免费|
久久久久18|
99久久成人18免费网站|
久久国产精品国产自线拍免费|
偷偷做久久久久网站|
久久天天躁狠狠躁夜夜2020一|
人人狠狠综合88综合久久|
久久99精品国产麻豆不卡|
狠狠色综合久久久久尤物|
久久福利青草精品资源站免费
|
成人午夜精品无码区久久|
2021国产精品久久精品|
欧美久久久久久精选9999|
精品久久久久久99人妻|
久久国产视频99电影|
免费一级欧美大片久久网|
久久久亚洲裙底偷窥综合|
中文字幕热久久久久久久|