本文共 811 字,大约阅读时间需要 2 分钟。
传送门://
AC代码
#include#include #include #include #include #include #include using namespace std;struct student{ char id[14]; int score,localTest,localRank,totalRank; bool operator>(const student &target){ if(score!=target.score) return score>target.score; else return strcmp(id, target.id)<0; }};int main(){ int n,m; scanf("%d",&n); vector allStudents; vector >LocalsocreCount(n,vector (101,0)); vector AllsocreCount(101,0); int start = 0,end=0; for (int i=0; i =0; j--) LocalsocreCount[i][j]+= LocalsocreCount[i][j+1]; end = end +m; for (int j = start; j =0; i--) { AllsocreCount[i]+= AllsocreCount[i+1]; } sort(allStudents.begin(), allStudents.end(), [](student a,student b){ return a>b; }); printf("%d\n",(int)allStudents.size()); for (int i=0; i
转载地址:http://oqhji.baihongyu.com/