結果

提出番号 1578
提出者 kzyKT
言語 C++
提出日時 2018-08-04 13:12:06
問題名 (69)机の配置
結果 AC
点数 100%

テストケース

テストケース 結果 得点 実行時間 メモリ使用量
1 AC 100% 1ms 8720KB
2 AC 100% 2ms 7968KB
3 AC 100% 2ms 8720KB
4 AC 100% 2ms 8400KB
5 AC 100% 1ms 8064KB
6 AC 100% 2ms 8416KB
7 AC 100% 2ms 7840KB
8 AC 100% 2ms 8080KB
9 AC 100% 2ms 7792KB
10 AC 100% 2ms 8016KB
11 AC 100% 1ms 8352KB
12 AC 100% 2ms 8416KB
13 AC 100% 2ms 8720KB
14 AC 100% 2ms 8432KB
15 AC 100% 2ms 8480KB
16 AC 100% 2ms 8448KB
17 AC 100% 2ms 8048KB
18 AC 100% 1ms 7824KB
19 AC 100% 2ms 7776KB
20 AC 100% 1ms 8688KB
21 AC 100% 1ms 8256KB
22 AC 100% 2ms 8064KB
23 AC 100% 2ms 7552KB
24 AC 100% 2ms 8064KB
25 AC 100% 2ms 7536KB
26 AC 100% 2ms 8416KB
27 AC 100% 1ms 8720KB
28 AC 100% 1ms 8720KB
29 AC 100% 1ms 7808KB
30 AC 100% 2ms 8432KB

ソースコード

#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define R cin>>
#define Z class
#define ll long long
#define ln cout<<'\n'
#define in(a) insert(a)
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define iter(c) __typeof((c).begin())
#define rrep(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
template<Z A>void pr(A a){cout<<a;ln;}
template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);}
template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);}
template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);}
template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}
ll check(ll n,ll m,ll x,ll y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1e9+7,MAXL=1LL<<61,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<int,int> P;

void Main() {
  int n,m,d;
  cin >> d >> n >> m;
  vector<string> s(n);
  rep(i,n) R s[i];
  REP(l,1,d+1) {
    int ans=0;
    rep(r,2) {
      vector<string> t=s;
      int cnt=0;
      rep(i,n) {
        rep(j,m) {
          bool f=1;
          rep(k,l) {
            if(j+k>=m||t[i][j+k]=='#') {
              f=0;
              break;
            }
          }
          if(f) {
            rep(k,l) t[i][j+k]='#';
            cnt++;
          }
        }
      }
      ans=max(ans,cnt);
    }
    pr(ans);
  }
}

int main(){ios::sync_with_stdio(0);cin.tie(0);Main();return 0;}