Comments

Yes, you are right. I find that I may recheck the same element in B.

so correct version should be:

curB=0;
for(int i=0;i<A.size;i++){
    c=A[i];
    while(curB<B.size && B[curB]!=c ) curB++;
    if(curB==B.size)return false;
    curB++;//move to next element to avoid recheck.
}
return true;

Auto comment: topic has been updated by DNNJFM (previous revision, new revision, compare).

On allllekssssaBlog before dinner, 11 years ago
0

Now I am going to eat Lizza:)

 1. 1. — Hi, I gotta great idea.! how about How about making a training group ?!:) Thumbs up if you want:))

On DNNJFMwhy there are so many, 11 years ago
0

Auto comment: topic has been updated by DNNJFM (previous revision, new revision, compare).

On DNNJFMwhy there are so many, 11 years ago
0

Tank u

On DNNJFMwhy there are so many, 11 years ago
0

I have no friend. Fried me piss

On DNNJFMwhy there are so many, 11 years ago
0

That is because this

0|<

Ok, I quit

But...But anta last visit at 25 hours ago

Thank you for your fast tutorial:)

OK

Yeah! love spongeBob, looking forward it!

Thank you. The next time I open codeforces I plan to solve at least 2 DIV A. problems. Then Higher if my rating can be higher. So now start from As.