https://www.luogu.org/problem/P1051 #include<bits/stdc++.h> using namespace std; struct node { string xm;//姓名 int qm,bj;//期末平均成绩,班级评议成绩 char bgb,xb;//是否是学生干部,是否是西部省份学生 int lw;//发表的论文数 int ans;//个人所获的奖金数 int num;//序号数,因为题目要求两个人所获的奖金数相同时,输出先出现的,即序号较靠前…
https://www.luogu.org/problemnew/show/P1051 这个根本就不用排序啊…… #include<bits/stdc++.h> using namespace std; #define ll long long int n; struct P{ ]; int f; int c; ]; ]; int p; int idx; int money; void calc(){ money=; ) money+=; &&c>) money+=; )…
1080 Graduate Admission (30 分) It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedure. Each…
http://codeforces.com/problemset/problem/158/B B. Taxi time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output After the lessons n groups of schoolchildren went outside and decided to visit Polyca…
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; char code[1000][100]; bool solve(int p) { for(int i = 1; i < p; i++) { int len = min(strlen(code[i-1]), strlen(code[i])); int j; for(…
题目描述 一共有n(n≤20000)个人(以1--n编号)向佳佳要照片,而佳佳只能把照片给其中的k个人.佳佳按照与他们的关系好坏的程度给每个人赋予了一个初始权值W[i].然后将初始权值从大到小进行排序,每人就有了一个序号D[i](取值同样是1--n).按照这个序号对10取模的值将这些人分为10类.也就是说定义每个人的类别序号C[i]的值为(D[i]-1) mod 10 +1,显然类别序号的取值为1--10.第i类的人将会额外得到E[i]的权值.你需要做的就是求出加上额外权值以后,最终的权值最大的…