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

AcWing 744. 数组中的列 更多...

#include <acwing.h>

静态 Public 成员函数

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

详细描述

AcWing 744. 数组中的列

在文件 acwing.h962 行定义.

成员函数说明

◆ main()

int acwing::acwing744::main ( istream &  cin,
ostream &  cout 
)
static

在文件 acwing.cpp2940 行定义.

2940 {
2941 int l;
2942 char op;
2943 double m[12][12];
2944 cin >> l >> op;
2945 for(auto &i: m) {
2946 for(auto &j: i) {
2947 cin >> j;
2948 }
2949 }
2950 double ans = 0;
2951 for(const auto &j: m) {
2952 ans += j[l];
2953 }
2954 if(op == 'M') {
2955 ans /= 12;
2956 }
2957 cout << fixed << setprecision(1) << ans;
2958 return 0;
2959 }

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