solved sequencemedian.cpp Problem ID: 1306