Home > Back-end >  Los valley subject P4387 [9] deep base 15. Learning validation stack sequence, which bosses know whe
Los valley subject P4387 [9] deep base 15. Learning validation stack sequence, which bosses know whe

Time:02-07



` ` ` CPP
# include
# include
using namespace std;
Stack s;
Int main ()
{
Int num, number, x;
Int flag=0;
Cin> num.
For (int I=1; I <=num; I++) {
Cin> number;
For (int j=1; J <=number; J++) {
Cin> x;
Supachai panitchpakdi ush (x);
}
while (! S.e mpty ()) {
Cin> x;
If (s.t op ()! X)={
Flag=1;
Supachai panitchpakdi op ();
}
The else
Supachai panitchpakdi op ();
}
if (! Flag) {
Cout <"Yes" }
The else {
Cout <"No" }
Flag=0;
while (! S.e mpty ())
Supachai panitchpakdi op ();
}
}
` ` `
  • Related