as long as Mary has

Have you lived here as long as Mary has?
Have you lived here as long as Mary has lived?
Have you lived here as long as Mary has lived here?
Are all OK?
Do they mean the same?
Thanks.

The 2nd is not correct.
The 1st is © but with an assumed ending, to avoid repetition.