The building Hunt needs to be on is 162m tall.
The adjacent building he will be swinging from is 226m tall.
The distance between the two is 47.55m long.
This tells us one thing: the rope has to be longer than 47.55m (plus a little extra to ensure that he lands ON the roof and not on the ground 162 meters below).
Hunt starts his impossible mission by running away from his target and jumping off the starting building. This allows him to swing towards the correct building. He would probably need to jump relatively far to make the swing. The farthest distance a human being has jumped is 8.9m, so we can assume it is less than, but somewhere around near it (considering the amazing physical ability Hunt has shown off in this movie).
So, Hunt would need a rope that can cover the 47.55m gap, give him about 10 feet (3.048m) of leeway to ensure a "safe" landing, and include the distance of the jump he makes at the beginning.
A better question would be where he got a rope that long on such short notice.
In another scene, Hunt displays the aforementioned amazing physical ability. This time the only thing preventing him from getting to his wife is about a mile and a half of Shanghai. He appears to be very quick in the scene. TOO quick. Could he have run that distance in that amount of time?
Over the phone, Benji is directing Hunt to the location of his wife. At one point he tells Ethan to run 3/4 of a mile, and then another 1000 yards after that. That, in addition to the small amount of running before and after those sprints, is about 2.5km, or about a mile and a half. After a quick google we find that the world record for the fastest mile ran was done in 3:43. Well, the movie shows the great Tom Cruise running 2.5km in about 1 minute and 10 seconds.
And I would have gotten winded by just running up the stairs in the beginning of the scene.
Finally, in the bridge scene where Hunt is under attack by bullets, missiles, and whatnot, we are met with one more glaring case of bad movie physics. At one point during the dramatic action sequence, Hunt must run and jump over an incredibly large gap to catch the baddies (which he fails to do anyway). Is it possible for him to jump over a gap that size?
The gap is about the length equal to that of a couple cars bumper to bumper. The average car length is somewhere between 4.5m and 4.8m, so this sets its size at good ten-ish meters at the very least. As I mentioned before, the record for the longest jump is 8.9m, so even though Hunt only barely made the jump, he probably just destroyed a world record.
I suppose it's called Mission Impossible for a reason (and I'm sure that joke has never been said in this class before).