include "stdafx.h"

#include<iostream>
#include<vector> #include<math.h>
#include <iomanip>
using namespace std; int main()
{
int n,m, x, y, t;
while (cin>>n>>m>>x>>y>>t)
{
vector<vector<float>> pVec;
for (int i = 0; i < n; i++)
{
vector<float> vec;
for (int j = 0; j < m ; j++)
{
float p;
cin >> p;
// cout << "内层循环" << endl;
vec.push_back(p);
}
pVec.push_back(vec);
} float ccP = 1-pow((1-pVec[x-1][y-1]),(double)t);
float ssP = 0.0;
int num = 0;
for (int x = 0; x < n; x++)
{
for (int y = 0; y < m; y++)
{
ssP = ssP+ pVec[x][y ]; }
} ssP = ssP/n/m;
ssP = 1 - pow((1 -ssP), (double)t); //设置输出标志 ssP = ssP * 100;
ccP = ccP * 100;
int sp = ssP;
int cp = ccP;
ssP = sp / 100;
ccP = cp / 100; cout << setiosflags(ios::fixed);
if (ssP >ccP)
{
cout << "ss" << endl;
cout << setprecision(2) << ssP << endl;
}
else if (ssP <ccP)
{
cout << "cc" << endl;
cout << setprecision(2) << ccP << endl;
}
else
{
cout << "equal" << endl;
cout << setprecision(2)<<ccP << endl;
} } return 0;
}
04-29 02:14