Страница 1 из 1

помогите пожалуйста пределать задачу на очередь и на списки)))

Добавлено: 27 май 2010, 09:03
Мириам

Код: Выделить всё

#include<fstream>
#include<string>

using namespace std;
struct stack{
string inf;
stack *next;};
stack *initstack(){
return NULL;};

void pushstack(stack *&h,string i){
stack*r=new stack;
r->inf=i;
if(h==NULL) r->next=NULL;
else r->next=h;
h=r;}

string popstack(stack *&h){
stack*r=h;
string i=r->inf;
h=r->next;
delete r;
return i;
}
int main(){
stack *h,*h1;
int s=0;string i,l,c;
h=initstack();
h1=initstack();
ifstream in("in.txt");
ofstream out("out.txt");
while(!in.eof())
{
in>>c;
pushstack(h,c);
}
l=popstack(h);
pushstack(h1,l);
while (h!=NULL)
{ 
	i=popstack(h);
	if(l!=i)pushstack(h1,i);
	else s++;
	
	
}
while(h1!=NULL)
{
	out<<popstack(h1)<<' ';
}out<<s;
return 0;
}

Re: помогите пожалуйста пределать задачу на очередь и на списки)))

Добавлено: 02 июн 2010, 08:39
two0426
First that the key I refer to task key in the collection and can be still retained after the completion of tasks. All my collections are based on the mandates of the keys to this. Players can not collect tasks key now in WOW, it should be replaced by handing over task will recall all the task items in the 3.0 version. I should be considered for these collections out of print.
I am missing now is dark ridge chest key of blacksmith
wedding dresses wow power leveling wow gold aion gold rolex Replica wedding dresses We are very wejsklds proud to announce that WAR is now live in Europe. This moment is the end of a very long road and the beginning of a new and glorious path
To our new players, we would like to say 'Welcome' on behalf of the whole GOA team, to those who have played with us before we would like to welcome you back wow power leveling Those of you who have not already been a part of the Headstart or Open Beta may be wondering what you need to do in order to get started.This is
a very exciting time and your choices now will affect your enjoyment of the game for a long time to come, we therefore urge you to choose your server wow gold carefully. To help you find a suitable home the server selection screen shows the relative population of each side on each server. To avoid
that you need to do is to create an account if you do not have one already. Go to our account registration page and fill in your details aion gold You will receive an email within a short while that will contain a link that you must follow to confirm your account. Once you've done that
you must register your product key. You will find this printed on a sticker inside the box, or, if you bought a digital version then your licence rolex Replica key will have been emailed to you by your retailer. Visit the code validation page to activate your licence key. Again you will receive a confirmation
email after a few minutes but this time you do not need to do anything with it. At the moment you do not need to enter any payment details or wow power leveling All that remains then is for you to install your game and patch it, then log in and play! Remember that you must use your login and password to access xll
task ore in the Naga Kuierdanna Island, use the previous method is also able to leave three to collection, as long as I am not going to do routine tasks. Method here refers to kill a certain strange and get a certain WOW keys. After complete items or conditions, go to destroy the strange keys. The key will continue to swap and exchange swap key task will not disappear.
Now I have not got a key, which is a Prince Chaffal static node between key. It should be used up, I do not care to re-take one with the Druid, while I was testing, some identified as "key" goods to whether put into the key chain. Union can get a little hot valley key, that I am the tribe, there is no way to get. No. 2 installed is a small little German, because the essence of the moon rock has only a small German occupation. Well, first of all is the door key of the hero instance, there is a total of five such key. The way to get it is only respect gets to reputation to be purchased with WOW gold.
In addition, the key players must own to enter into the instance, there is a total of ten. Such keys are usually the key to enter into some instance, lack of these keys players can not enter into. Most people have got in WOW. Next is the key to open all key, there are many such keys, at most twenty three. They can used to deal basically. They have many roles and advantages when players use them xll.