結果
問題 | No.712 赤旗 |
ユーザー |
|
提出日時 | 2021-06-17 23:49:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 756 bytes |
コンパイル時間 | 1,791 ms |
コンパイル使用メモリ | 170,572 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-06-11 17:29:58 |
合計ジャッジ時間 | 1,972 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
//#include <atcoder/all>#include <bits/stdc++.h>using namespace std;//using namespace atcoder;using ll = long long;#define all(A) A.begin(),A.end()using vll = vector<ll>;#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)using Graph = vector<vector<ll>>;Graph G;vll dist;vector<bool> seen;ll mod = 1e9 + 7;ll inv(ll N) {ll a = N, b = mod, c = 1, d = 0;while (b > 0) {ll t = a / b;a -= t * b;swap(a, b);c -= t * d;swap(c, d);}c %= mod;if (c < 0)c += mod;return c;}int main() {ll N,M;cin>>N>>M;ll an=0;rep(i,N){string S;cin>>S;rep(j,M){an+=(S[j]=='W');}}cout<<an<<endl;}