結果

提出番号 1642
提出者 Pro_ktmr
言語 C++
提出日時 2018-08-04 13:19:57
問題名 (69)机の配置
結果 WA
点数 0%

テストケース

テストケース 結果 得点 実行時間 メモリ使用量
1 AC 100% 2ms 8416KB
2 WA 0% 2ms 8704KB
3 AC 100% 2ms 7920KB
4 WA 0% 2ms 8448KB
5 AC 100% 2ms 7552KB
6 WA 0% 1ms 7472KB
7 AC 100% 2ms 8272KB
8 WA 0% 2ms 8000KB
9 AC 100% 1ms 8336KB
10 AC 100% 2ms 7552KB
11 WA 0% 2ms 8432KB
12 AC 100% 2ms 8688KB
13 WA 0% 2ms 7552KB
14 WA 0% 2ms 8064KB
15 WA 0% 2ms 8736KB
16 AC 100% 2ms 7504KB
17 AC 100% 2ms 7808KB
18 AC 100% 2ms 8720KB
19 WA 0% 2ms 8432KB
20 AC 100% 2ms 7776KB
21 AC 100% 2ms 8672KB
22 WA 0% 2ms 8144KB
23 WA 0% 2ms 7792KB
24 AC 100% 2ms 8448KB
25 WA 0% 1ms 7488KB
26 AC 100% 2ms 8336KB
27 WA 0% 2ms 8272KB
28 AC 100% 2ms 8448KB
29 WA 0% 2ms 7840KB
30 AC 100% 2ms 8432KB

ソースコード

#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 << min(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;
//}