首页 >
头像 小琢卷不动
发表于 2021-11-23 14:52:27
考察结构体排序,给每个选手记一个结构体,存放他的答案、得分、名字,在排序的时候自定义一个 < 运算,如果分数相同按照姓名的字典序排序即可。 对于计算分数,我们可以考虑把 100100100 分分成 nnn 份,每答对一道题就分配 100n\dfrac{100}{n}n100​ 分给这位同学即可 展开全文
头像 postpone
发表于 2026-02-08 05:05:30
模拟题。我们将答对题目数量的相反数,作为第一关键字,将选手名字的字典序作为第二关键字,取最小的即可。 #include <iomanip> #include <iostream> #include <limits> using namespace std; in 展开全文
头像 chenlan114
发表于 2026-02-08 13:16:00
#include<bits/stdc++.h> using namespace std; using ll=long long; struct B{ string name; double score=0; }; int main(){ ios::sync_with 展开全文
头像 BeauWill
发表于 2026-02-08 15:18:29
Modern Cpp #include <iostream> #include <vector> #include <string> #include <algorithm> #include <iomanip> int main() { 展开全文
头像 lotusor
发表于 2026-02-08 17:50:51
n,m = map(int,input().split()) right = input() out = [] ans = -1 core = 100/n for _ in range(m): name = input() check = input() cnt = 0 展开全文
头像 为芙宁娜献出心脏
发表于 2026-02-08 17:56:26
就是很普通的模拟,直接暴力STL就好了 详细代码如下 // BggBB wZPXsv:. UBgQGv // BgEQQ ,:sJ. .,. ::, rBORZJ 展开全文
头像 闲虞
发表于 2026-02-08 19:13:23
#include <stdio.h> #include<string.h> struct BF { char name[51]; double score ; }; int main() { int n,m,count,max=0; char 展开全文
头像 Erua
发表于 2026-02-08 04:32:01
#include <bits/stdc++.h> using namespace std; using ll=long long; #define endl '\n' using vi=vector<int>; using vll=vector<ll>; usin 展开全文
头像 YunBaichuan
发表于 2026-02-08 09:57:28
思路:模拟题。根据题意进行模拟,最终输出结果即可 代码: import sys input = lambda: sys.stdin.readline().strip() import math inf = 10 ** 18 def I(): return input() def II( 展开全文
头像 ccl_aurora
发表于 2026-02-08 10:41:11
#include <iostream> #include<vector> #include<algorithm> #include<iomanip> using namespace std; class man{ public: string 展开全文