这两题很类似,看看上面题解即可 c++代码如下: #include<bits/stdc++.h>#define rep(i,x,y) for(register int i = x ;i <= y;++ i)#define repd(i,x,y) for(register int i = x ; i >= y;-- i)using namespace std;typedef long
未采用结构体的解法,通过二维数组解题 #include <stdio.h> void rank(int arr[10][6] ) { int str[4] = { 0 }; int a1[6] = { 0 }; int k = 0; int i = 0; int z = 0; int j = 0; int temp = 0; dou
#include <bits/stdc++.h>using namespace std;const int N = 9999;//懂得都懂。int a[N];int main () {int n, m;double sum = 0, max = 0;//看题,有小数点。cin >> n >> m;for (int i = 0; i < n; i++) //输入n组数据。{for (in