Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: anonymous
Problemset: A.Circle Area
Language: cpp
Time: 0.003 second
Submitted On: 2026-10-20 12:08:05
#include <bits/stdc++.h>
using namespace std;
int n,m,mx = 0,x,y;
int main(){
cin >> n >> m;
char arr[105][105];
for(int i=0;i<n;i++) cin >> arr[i];
int cnt[n];
for(int i=0;i<n;i++) cnt[i] = 0;
for(int i=0;i<n;i++){
int roll = 0;
for(int j=0;j<m;j++)
{
if(arr[i][j] == '#'){
cnt[i]++;
roll += j+1;
}
}
if(cnt[i] > mx){
mx = cnt[i];
x = i + 1;
y = roll;
}
}
int center;
center = y/mx;
double r = mx/2.0;
cout << x << ' ' << center << '\n';
double area = r*r*3.14;
cout << fixed << setprecision(2) << area;
}