一维数组,40分求助

P5738 【深基7.例4】歌唱比赛

找最小值那段不要加else,会导致改变最大值后就不找最小值了 还有s[i]+a[j]最好提到if语句外面,不然又会在找最小值时重复加
by UnrulyHayato @ 2022-08-24 21:17:15


先感谢大佬这么晚还回蒟蒻的帖 e,60分了,改成了这样: ```c if(MAX<a[j]){ MAX=a[j]; } if(MIN>a[j]){ MIN=a[j]; } s[i]+=a[j]; ```
by ZHR20100222 @ 2022-08-24 22:28:25


???
by ZHR20100222 @ 2022-08-24 22:28:50


@[ZHR20100222](/user/582118) [60分](https://www.luogu.com.cn/record/85028391)
by ZHR20100222 @ 2022-08-24 22:30:47


|