摘要:
1537:水题,排序贪心#include#include#include#define maxn 1009using namespace std;int num[maxn];int tmp[maxn];int b[maxn];int main(){ int n; while(scanf("%d",&n)&&n) { for(int i=1;in-i;j--) ans+=tmp[j]; ret=max(ret,ans); } printf("%d\n",ret); } re... 阅读全文