> 其他 >
c++ find the column number(index) that have maximum sum of it's elements
You task is to find the column number(index) that have maximum sum of it's elements.
Input
First line N and M (1
人气:195 ℃ 时间:2020-05-20 22:41:57
解答
#include#includeusing namespace std;int main(){int n;int m;cin>>n>>m;int* array = new int[m*n];int i,j;for(i=0; i>array[i];int max = -1;int col = 1;for(j=0; j
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版