18: Obviously, the longest possible beam will, when carried through the turn, touch its inner corner. Thus to find the length one can consider a segment that touches the inner corner and see where it touches the outer walls. Obviously critical the position is not known, so one should consider all possible position and code them somehow. One possibility is to code its position by a suitable angle a.

Find the length of the segment that can fit in for a fixed angle a.

Next hint
Answer