Carrier distribution and low-field resistance in short n+-n--n+and n+-p--n+structures