include iostream include cmath include conio using namespace std int 1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include <cmath>
#include <conio.h>
using namespace std;
int a[10000][10000];
double b[10000];
int count[10000];
int main(){
int m, n;
printf("Vvedite razmer massiva\n");
scanf("%d%d", &m, &n);
printf ("Vvedite elementi massiva\n");
for (int q=0; q<n; q++)
b[q] = 1.0;
for (int q=0; q<m; q++)
for (int w=0; w<n; w++)
scanf("%d", &a[q][w]);
for (int q=0; q<m; q++)
for (int w=0; w<n; w++){
b[w] *= a[q][w];
}
for (int q=0; q<n; q++)
b[q] = pow(b[q], 1.0/m);
for (int q=0; q<m; q++)
for (int w=0; w<n; w++)
if (a[q][w] < b[w])
count[w]++;
for (int q=0; q<n; q++)
printf("%d ", count[q]);
printf("\n");
}