# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
202791 | mayhoubsaleh | Emacs (COCI20_emacs) | C++14 | 5 ms | 380 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define pb push_back
#define ll long long
using namespace std;
int n,m;
char c[111][111];
int main()
{
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>n>>m;
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
cin>>c[i][j];
}
}
for(int i=0;i<=n;i++)c[i][0]='.';
for(int i=0;i<=m;i++)c[0][i]='.';
int ans=0;
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if(c[i][j]=='*'&&c[i-1][j]!='*'&&c[i][j-1]!='*')ans++;
}
}
cout<<ans<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |