problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
luogu::P5738类 参考

洛谷 P5738 【深基7.例4】歌唱比赛 更多...

#include <luogu.h>

静态 Public 成员函数

static int main (istream &cin, ostream &cout)
 

详细描述

洛谷 P5738 【深基7.例4】歌唱比赛

在文件 luogu.h615 行定义.

成员函数说明

◆ main()

int luogu::P5738::main ( istream &  cin,
ostream &  cout 
)
static

在文件 luogu.cpp2313 行定义.

2313 {
2314 int n;
2315 int m;
2316 cin >> n >> m;
2317 double ans = 0;
2318 for(int i = 0; i < n; i++) {
2319 vector<int> vec(m);
2320 for(int j = 0; j < m; j++) {
2321 cin >> vec[j];
2322 }
2323 sort(vec.begin(), vec.end());
2324 ans = max(ans, static_cast<double>(accumulate(vec.begin() + 1, vec.end() - 1, 0)) / (m - 2));
2325 }
2326 cout << fixed << setprecision(2) << ans;
2327 return 0;
2328 }
int vec[100010]
Definition: pat.cpp:5095

引用了 pat::a::a7_2::vec.

被这些函数引用 luogu::TEST().


该类的文档由以下文件生成: