#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mid a+(b-a)/2
const int N=5e5+5;
const int MOD=1e9+7;
const int inf=2e18+5;
int32_t main(){
ios_base::sync_with_stdio(0); cin.tie(0);
int n,m; cin>>n>>m;
int ans=0;
char curr;
for(int i=0;i<n;i++){
for(int j=1;j<m;j++){
char x; cin>>x;
if(ans==0){
ans++;
curr=x;
}
if(x!='.' && curr!=x){
ans++;
break;
}
}
if(ans==2){break;}
}
cout<<ans;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
508 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
16 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
17 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
18 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
504 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
16 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
17 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
18 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
19 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
20 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
21 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
22 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
23 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
24 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
25 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
26 |
Correct |
102 ms |
12236 KB |
Output is correct |
27 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
28 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
29 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
30 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
31 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
32 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |