Most of the theories of the solar system formation stand on the assumption that the formation of planetesimals occurs in a transparent (i.e., optically thin) nebula, in which H(2)O ice is unstable at the formation region of the terrestrial planet due to direct stellar irradiation. However, in the astronomical context, it is confirmed by both observations and numerical models that protoplanetary disks are initially opaque (i.e., optically thick) owing to floating small dust particles, and the interior of the disk is colder than the transparent disk. If planetesimals are formed in the opaque cold nebula, they should be mainly composed of H(2)O ice, even at the formation region of terrestrial planets. Abundant icy material would help the formation of planetesimals through enhancement of the dust amount. Icy planetesimals start sublimation when the protoplanetary disk gets transparent through clearance of small dust particles. Here, we investigated the consequence of such icy planetesimal formation through numerical simulations of the competition between the sublimation and accretion of icy planetesimals. It was shown that various types of planets ranging from rocky planets to water-ball planets can be formed inside the location of the snow line of a transparent disk depending on the disk mass and the time evolution of disk transparency. We found size-dependent water content of icy planetesimals, which suggests potential difference in the redox state between meteorites and terrestrial planets at the same distance from the central star.