| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148267 | 李朋秦 | 【基础题】平均数 | C++ | Running & Judging | 0 MS | 0 KB | 369 | 2026-02-10 17:01:04 |
#include<bits/stdc++.h> using namespace std; struct book{ string m; double j; }b[20]; bool p(book x,book y){ return x.j>y.j; } int main() { int n; cin>>n; for(int i=0;i<n;i++){ cin>>b[i].m>>b[i].j; } sort(b,b+n,p); printf("%.2lf",b[0].j); cout<<","<<b[0].m<<endl; printf("%.2lf",b[n-1].j); cout<<","<<b[n-1].m<<endl; return 0; }