Spatially distributed p-n heterojunction based on nanoporous TiO2 and CuSCN