Directed self-assembly (DSA) is an attractive next-generation lithography (NGL) technique. Nevertheless, a high-quality via/contact layout decomposition method is required to enable the technology. In this paper, we introduce a via/contact layout decomposition method based on local optimization. Besides Maximal Cardinality Matching(MCM), this method uses local optimization to reduce the conflicts between grouping and coloring and adds the step of a uniform coloring algorithm to make the density of coloring results uniform. Simulation results show that this method is suitable for large-scale layouts, and achieves better results.