#include
#include
#include
using namespace std;
class Solution {
public:
int maxCount(int m, int n, vectorint >> v2) {
int min1 = m;
int min2 = n;
for (int i = 0; i < sizeof(v2); ++i) {
if (v2[i][0] < min1)
{
min1 = v2[i][0];
}
if (v2[i][1] < min2)
{
min2 = v2[i][1];
}
}
return min1 * min2;
}
};
int main()
{
int p, s;
int row,column;
int result;
vectorint>> v1;
cout << "Please input m , n:" << " " << endl;
cin >> p >> s;
cout << "Please input the row and column of the vector:" << " " << endl;
cin >> row >> column;
cout << "Please input contents of the vector:" << " " << endl;
for (int x = 0; x < row; x++)
{
for (int y = 0; y < column; y++)
{
cin >> v1[x][y];
}
}
Solution test;
result = test.maxCount(p, s, v1);
cout << "maxCount = " << result;
return 0;
}
啥问题啊?