HDU ACM 11 2023 求平均成绩
来源:互联网 发布:红包软件下载 编辑:程序博客网 时间:2024/04/29 07:33
#include <iostream>using namespace std;int main(){double Lu[100][100];int n, m, x, j = 0, Yi = 0, Zheng = 0;double sum = 0, averange;double Hui[100];double w[100];while (cin >> n >> m && n){for (int i = 0; i < n; i++)for (x = 0; x < m; x++)cin >> Lu[i][x];for (int i = 0; i < n; i++){for (x = 0; x < m; x++)sum += Lu[i][x];averange = sum/m;w[i] = averange;averange = 0;sum = 0;}cout << fixed;cout.precision(2);cout << w[0];for (int i = 1; i < n; i++)cout << ' ' << w[i];cout << endl;for (int i = 0; i < m; i++){for (x = 0; x < n; x++)sum += Lu[x][i];averange = sum/n;Hui[i] = averange;cout << fixed;cout.precision(2);averange = 0;sum = 0;}cout << Hui[0];for (int i = 1; i < m; i++)cout << ' ' << Hui[i];cout << endl;for (int i = 0; i < n; i++){for (x = 0; x < m; x++){if (Lu[i][x] >= Hui[x])Yi++;}if (Yi == m)Zheng++;Yi = 0;}cout << Zheng << endl << endl;Zheng = 0;j = 0;}return 0;}
0 0
- HDU ACM 11 2023 求平均成绩
- hdu 2023 求平均成绩
- HDU 2023 求平均成绩
- HDU 2023 求平均成绩
- hdu 2023 求平均成绩
- hdu-2023-求平均成绩
- HDU 2023 - 求平均成绩
- HDU 2023 求平均成绩.
- [hdu 2023] 求平均成绩
- HDU 2023 求平均成绩
- HDU 2023 求平均成绩
- hdu 2023 求平均成绩
- hdu 2023 求平均成绩
- HDU 2023 -- 求平均成绩
- HDU 2023求平均成绩
- hdu 2023 求平均成绩
- HDU 2023 求平均成绩
- HDU 2023 求平均成绩
- 求两个中位数
- [F][10+]NOIP 2014 飞扬的小鸟
- add 'tools:replace="android:value"' to <meta-data> element问题的解决
- make makefile cmake qmake都是什么,有什么区别
- 字符串、向量和数组(三)
- HDU ACM 11 2023 求平均成绩
- 浮点数可以用==来比较是否相等吗?
- [T][2]NOIP 2014 无线网络发射器选址
- A除B的例子
- 【Java基础知识】终止单层和多层循环break的使用,跳出一次循环continue的使用
- php中的cookie和session
- Introduction to coroutine
- javaweb中表单post和get提交方式出现乱码原因
- 操作系统中长期调度、中期调度和短期调度之间的区别