Ukrainian authorities said the attacks appeared to target the country’s energy infrastructure in several cities.