結果

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

テストケース

テストケース 結果 得点 実行時間 メモリ使用量
1 AC 100% 1ms 8096KB
2 AC 100% 2ms 8448KB
3 AC 100% 2ms 8720KB
4 AC 100% 2ms 8432KB
5 AC 100% 2ms 8016KB
6 AC 100% 2ms 7616KB
7 AC 100% 2ms 8464KB
8 AC 100% 2ms 8432KB
9 AC 100% 2ms 7792KB
10 AC 100% 2ms 8416KB
11 AC 100% 2ms 8160KB
12 AC 100% 2ms 8176KB
13 AC 100% 2ms 8112KB
14 AC 100% 2ms 7504KB
15 AC 100% 2ms 7632KB
16 AC 100% 2ms 7248KB
17 AC 100% 2ms 7792KB
18 AC 100% 2ms 7792KB
19 AC 100% 2ms 8064KB
20 AC 100% 1ms 7520KB
21 AC 100% 2ms 8416KB
22 AC 100% 2ms 7520KB
23 AC 100% 2ms 8432KB
24 AC 100% 2ms 8720KB
25 AC 100% 2ms 8432KB
26 AC 100% 2ms 8416KB
27 AC 100% 2ms 8192KB
28 AC 100% 1ms 7904KB
29 AC 100% 2ms 8048KB
30 AC 100% 2ms 8448KB

ソースコード

#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define LL long long
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
#define segment_size 65536
#define ROOP() while(true)


////1
//int main() {
//	int f, s;
//	cin >> f >> s;
//	bool ans = true;
//	while (f >= 2 && s >= 1) {
//		f -= 2;
//		s -= 1;
//		ans = !ans;
//	}
//	if (ans) cout << "K" << endl;
//	else cout << "O" << endl;
//
//	return 0;
//}


////2
//int main() {
//	int N, M;
//	cin >> N >> M;
//	vector<int> A;
//	for (int i = 0; i < N; i++) {
//		int tmp;
//		cin >> tmp;
//		A.push_back(tmp);
//	}
//	sort(A.begin(), A.end());
//	reverse(A.begin(), A.end());
//	
//	int ans = 0;
//	int tmp = 0;
//	while (tmp < M) {
//		tmp += A[ans];
//		ans++;
//	}
//	cout << ans << endl;
//
//	return 0;
//}



//3
int main() {
	int N, H, W;
	cin >> N >> H >> W;
	vector<string> f;
	for (int i = 0; i < H; i++) {
		string tmp;
		cin >> tmp;
		f.push_back(tmp);
	}

	for (int i = 1; i <= N; i++) {
		//横
		int ans1 = 0;
		for (int j = 0; j < H; j++) {
			for (int k = 0; k < W; k++) {
				if (k + i > W) break;
				bool tmp = true;
				for (int l = k; l < k + i; l++) {
					if (f[j][l] == '#') tmp = false;
				}
				if (tmp) {
					ans1++;
					k += i - 1;
				}
			}
		}

		//縦
		int ans2 = 0;
		//for (int j = 0; j < W; j++) {
		//	for (int k = 0; k < H; k++) {
		//		if (k + i > H) break;
		//		bool tmp = true;
		//		for (int l = k; l < k + i; l++) {
		//			if (f[l][j] == '#') tmp = false;
		//		}
		//		if (tmp) {
		//			ans2++;
		//			k += i - 1;
		//		}
		//	}
		//}

		cout << max(ans1, ans2) << endl;
	}

	return 0;
}



////4
//int main() {
//
//
//	return 0;
//}



////5
//int main() {
//
//
//	return 0;
//}



////6
//int main() {
//
//
//	return 0;
//}



////7
//int main() {
//
//
//	return 0;
//}



////8
//int main() {
//
//
//	return 0;
//}



////9
//int main() {
//
//
//	return 0;
//}



////10
//int main() {
//
//
//	return 0;
//}