首页 > TAG信息列表 > ratingsSize

贪心算法-135

1 int candy(int* ratings, int ratingsSize) { 2 int *candys = NULL; 3 int resulte = 0; 4 5 candys = (int *)malloc(sizeof(int)*ratingsSize); 6 if (NULL == candys) 7 { 8 return 0; 9 } 10 candys[0] = 1; 11 for