Nitrogen-doped cuprous oxide as a p-type hole-transporting layer in thin-film solar cells