結果
問題 | No.712 赤旗 |
ユーザー | te-sh |
提出日時 | 2018-07-24 10:11:46 |
言語 | D (dmd 2.107.1) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 519 bytes |
コンパイル時間 | 681 ms |
コンパイル使用メモリ | 93,380 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-03 20:46:24 |
合計ジャッジ時間 | 1,392 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,380 KB |
ソースコード
import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string; auto rdsp(){return readln.splitter;} void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;} void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);} void readC(T...)(size_t n,ref T t){foreach(ref v;t)v=new typeof(v)(n);foreach(i;0..n){auto r=rdsp;foreach(ref v;t)pick(r,v[i]);}} void main() { int n, m; readV(n, m); string[] a; readC(n, a); writeln(n*m - a.map!(ai => ai.count('R')).sum); }