same, i upsolved D without looking at solution but cant understand C even after looking solution of it