WA了后6点
#include<iostream>
#include<cstdio>
#include<iomanip>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<stack>
#include<vector>
#include<set>
#define ll long long
#define db double
#define MAX 0x7fffffff
#define init inline int
#define INF 0X3fffffff
using namespace std;
ll tox[9]={0,1,0,-1,0,1,1,-1,-1};
ll toy[9]={0,0,1,0,-1,-1,1,1,-1};
ll n,m,s,que[40001][4];
char a[201][201];
ll res,ans;
ll ma[100001];
void bfs(ll x,ll y)
{
res=1;
ll head=1,tail=1;
ll i;
que[tail][1]=x;
que[tail][2]=y;
a[x][y]='.';
tail++;
while(head<tail)
{
int qx=que[head][1];
int qy=que[head][2];
for(i=1;i<=8;i++)
{
int x1=qx+tox[i];
int y1=qy+toy[i];
if(x1>0 && x1<=n && y1>0 && y1<=m && a[x1][y1]=='*')
{
a[x1][y1]='.';
que[tail][1]=x1;
que[tail][2]=y1;
tail++;
res++;
}
}
head++;
}
if(!ma[res]) ma[res]=1;
else ma[res]++;
}
int main()
{
// freopen("star.in","r",stdin);
// freopen("star.out","w",stdout);
int i,j;
cin>>n>>m;
for(i=1;i<=n;i++)
{
for(j=1;j<=m;j++)
{
cin>>a[i][j];
}
}
for(i=1;i<=n;i++)
{
for(j=1;j<=m;j++)
{
if(a[i][j]=='*')
{
bfs(i,j);
}
}
}
for(int i=1;i<=100001;i++) {
if(ma[i]) s++;
res=i*ma[i];
if(res>ans) ans=res;
}
cout<<s<<" "<<ans;
fclose(stdin);fclose(stdout);
return 0;
}