結果

問題 No.712 赤旗
ユーザー engawadeeeeesuengawadeeeeesu
提出日時 2018-07-21 01:28:55
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 941 bytes
コンパイル時間 1,384 ms
コンパイル使用メモリ 143,504 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-27 00:24:56
合計ジャッジ時間 2,052 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

using namespace std;

typedef long long int lli;
typedef pair<int, int> ii;

template<class T>bool chmax(T &a, const T &b) { if( a < b ) { a = b; return 1; } return 0;}
template<class T>bool chmin(T &a, const T &b) { if( b < a ) { a = b; return 1; } return 0;}

#ifdef LOCAL
	#define eprintf(...) printf(__VA_ARGS__)
#else
	#define eprintf(...) 1
#endif

#define ROUNDUP(a, b) 		( ((a) + ((b) - 1) ) / (b))
#define SET_ZERO(a)	 		( memset((a), 0, sizeof(a)))
#define SET_NUM_ARRAY(a,b)	( memset((a), b, sizeof(a)))
//#define int long long int //dont forget to change int to signed

const int INT_INF = 1000000007;

int main() {
	int N, M;
	cin >> N >> M;
	int ctr = 0;
	for (int i = 0; i < N; i++) {
		char s[59];
		cin >> s;
		for (int j = 0; j < M; j++) {
			if (s[j] == 'W') {
				ctr++;
			}
		}
	}
	cout << ctr << endl;
	return 0;
}
0