Char 34: runtime error: addition of unsigned offset to 0x603000000070 overflowed to 0x60300000006c
问题出在i-1这里当i等于0的时候,candidates[i-1]和used[i-1]会试图访问数组的负索引,这是未定义的行为,可能导致运行时错误。你需要确保在进行这种操作之前检查i是否大于0:if(i>0&&candidates[i]==candidates[i-1]&&used[i-1]==0)总结在大多数情况下,这种类型的错误信息表示尝试访问了数组的某个位置,而这个位置不在数组的有效范围内,