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

AcWing 743. 数组中的行 更多...

#include <acwing.h>

静态 Public 成员函数

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

详细描述

AcWing 743. 数组中的行

在文件 acwing.h956 行定义.

成员函数说明

◆ main()

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

在文件 acwing.cpp2919 行定义.

2919 {
2920 int l;
2921 char op;
2922 double m[12][12];
2923 cin >> l >> op;
2924 for(auto &i: m) {
2925 for(auto &j: i) {
2926 cin >> j;
2927 }
2928 }
2929 double ans = 0;
2930 for(int j = 0; j < 12; j++) {
2931 ans += m[l][j];
2932 }
2933 if(op == 'M') {
2934 ans /= 12;
2935 }
2936 cout << fixed << setprecision(1) << ans;
2937 return 0;
2938 }

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


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