Hard problems that reduce to document ranking