# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
511465 | Jean7 | Emacs (COCI20_emacs) | C++14 | 1 ms | 204 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 fio ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define int long long
using namespace std ;
int32_t main ()
{
fio
int n , m , ans = 0 ;
cin >> n >> m ;
char a[n][m] ;
for ( int i = 0 ; i < n ; i++ )
{
for ( int k = 0 ; k < m ; k++ ) cin >> a[i][k] ;
}
for ( int i = 0 ; i < n ; i++ )
{
for ( int k = 0 ; k < m ; k++ )
{
if ( a[i][k] == '*' )
{
ans++ ;
while ( a[i][k] == '*' ) k++ ;
int j = 0 ;
for ( int l = i ; a[l][k-1] == '*' ; l++ )
{
while ( j < k )
{
a[l][j] = '.' ;
j++ ;
}
j = 0 ;
}
}
}
}
cout << ans ;
return 0 ;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |