Home > Back-end >  This is a question of Joseph ring of the variation
This is a question of Joseph ring of the variation

Time:09-29

#include
Using namespace STD.
Static int ll=0, ooo=1, lm=0;
The class node
{
Public:
int data;
Node * next;
The node ();
};
Node: : node ()
{
Next=NULL;
}
The class list
{
Public:
The head node * and * s, * (p1, p2, * : QQQ, * p3;
The list ();
Void the add ();
Void dele (int);
};
The list: a list ()
{
The head=NULL;
}
Void list: : add ()
{
Int j, I;
Cin & gt;> m;
Lm=m;
Cin & gt;> Ll;
For (I=1; I & lt;=m; I++)
{
S=new node;
S - & gt; Data=https://bbs.csdn.net/topics/i;
If (head==NULL)
{
The head=s;
P1=head;
}
The else {
P1 - & gt; Next=s;
P1=p1 - & gt; Next;
}
}
P1 - & gt; Next=head;
}
Void list: : dele (int m)
{
P1=head;
P1 p2=;
int i;
While (1)
{
P1=p1 - & gt; Next;
If (p1 - & gt; Next==head)
{
S=p; break;
}
}
P1=s;
The p2=p1 - & gt; Next;
While (1)
{
If (p1 - & gt; Next==(p1)
{
Cout & lt; The delete p1;
break;
}
If (ooo & gt; (lm + 1)/2)
break;
If (m==1)
The p2=p1 - & gt; Next;
For (I=1; I{
P1=p1 - & gt; Next;
The p2=p1 - & gt; Next;
}
P1 - & gt; Next=p2 - & gt; Next;
Cout & lt; Delete the p2.
The p2=p1 - & gt; Next;
P1 - & gt; Next=p2 - & gt; Next;
Cout & lt; Delete the p2.
Ooo++;
}
}
Int main ()
{
The list A;
A.a dd ();
A. d. ele (ll);
} A is Not allowed the system call: runid: 323253: system USES prohibited operating system calls, see if the files or unauthorized access process resources such as what do you mean
  • Related