結果

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

テストケース

テストケース 結果 得点 実行時間 メモリ使用量
1 AC 100% 2ms 8432KB
2 AC 100% 1ms 8688KB
3 AC 100% 2ms 7248KB
4 AC 100% 1ms 8688KB
5 AC 100% 2ms 7600KB
6 AC 100% 2ms 8480KB
7 AC 100% 2ms 8016KB
8 AC 100% 2ms 7248KB
9 AC 100% 2ms 8720KB
10 AC 100% 2ms 8416KB
11 AC 100% 2ms 7248KB
12 AC 100% 2ms 8416KB
13 AC 100% 2ms 7984KB
14 AC 100% 1ms 8416KB
15 AC 100% 2ms 8400KB
16 AC 100% 2ms 8400KB
17 AC 100% 2ms 8448KB
18 AC 100% 2ms 8720KB
19 AC 100% 1ms 8736KB
20 AC 100% 1ms 8464KB
21 AC 100% 2ms 7616KB
22 AC 100% 2ms 8384KB
23 AC 100% 2ms 7632KB
24 AC 100% 2ms 7824KB
25 AC 100% 2ms 8432KB
26 AC 100% 2ms 8416KB
27 AC 100% 1ms 7904KB
28 AC 100% 2ms 8720KB
29 AC 100% 2ms 8672KB
30 AC 100% 2ms 8432KB

ソースコード

//#pragma once
#include <stdio.h>
#include <string>
#include <iostream>
#include <queue>
#include <algorithm>
#include <sstream>
#include <vector>
#include <math.h>
#include <set>

using namespace std;

long long N, M, K,a,b,c,d,e,H,W;
long long ans[300];
char A[200][200] = {};
long long total[200001] = {};
bool f[601][601];
string S;
set <long long>sll;
vector <long long>vll;
typedef pair<long long, long long> pl;
pl buf;


int main() {
	cin >> N>>H>>W;
	b = 0;
	for (int i = 0; i <H ; i++) {
		for (int j = 0; j < W; j++) {
			cin >> A[i][j];
			if (A[i][j] == '#') {
				total[b]++;
				b = 0;
			}
			else {
				b++;
			}
		}
		total[b]++;
		b = 0;
	}


	for (int i = 1; i <= N; i++) {
		b = 0;
		for (int j = i; j <= W; j++) {
			b += (j / i) * total[j];
		}
		cout << b << endl;
	}

	
	

	return 0;
}