On Some Nonstandard Dynamic Programming Problems of Control Theory