結果
問題 |
No.712 赤旗
|
ユーザー |
![]() |
提出日時 | 2018-07-21 01:28:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 941 bytes |
コンパイル時間 | 1,770 ms |
コンパイル使用メモリ | 157,648 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 04:36:12 |
合計ジャッジ時間 | 2,152 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
#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; }