HDU 2023
来源:互联网 发布:网络推广访问者 编辑:程序博客网 时间:2024/04/25 12:57
#include<iostream>#include<iomanip>using namespace std;#define ROWS 55#define COLUMNS 10int main(){ int n, m, ans; double grade[ROWS][COLUMNS]; double temp_r, temp_c; bool judge; while(cin >> n >> m) { ans = 0; for(int i = 0; i < n; i++) { temp_r = 0.0; for(int j = 0; j < m; j++) { cin >> grade[i][j]; temp_r += grade[i][j]; } grade[i][m] = temp_r / m; } for(int i = 0; i < m; i++) { temp_c = 0.0; for(int j = 0; j < n; j++) temp_c += grade[j][i]; grade[n][i] = temp_c / n; } for(int i = 0; i < n; i++) { judge = true; for(int j = 0; j < m; j++) if(grade[i][j] < grade[n][j]) { judge = false; break; } if(judge) ans++; } for(int i = 0; i < n; i++) { if(i != 0) cout << ' '; cout << fixed; cout << setprecision(2) << grade[i][m]; } cout << endl; for(int i = 0; i < m; i++) { if(i != 0) cout << ' '; cout << fixed; cout << setprecision(2) << grade[n][i]; } cout << endl; cout << ans << endl; cout << endl; } return 0;}
0 0
- HDU 2023
- hdu 2023
- HDU-2023
- HDU 2023
- HDU 2023
- HDU 2023
- HDU 2023 平均成绩
- hdu oj 2023
- HDU-ACM-2023
- HDU 2023 JAVA
- Hdu 2023 海选女主角
- hdu
- hdu
- HDU
- hdu ()
- hdu
- hdu
- HDU
- DOM笔记(四):HTML 5 DOM复杂数据类型
- HDU 2021
- 获取手机的储存空间
- HDU 2022
- 一致性。
- HDU 2023
- UVA - 536 Tree Recovery
- HDU 2024
- 程立支付宝首席架构师,视频演讲地址,
- HDU 2025
- 关于ViewPager的懒加载问题
- Javascript的奇怪用法
- 我是一名程序员
- 区分struct和typedef struct