結果

問題 No.2240 WAC
ユーザー とりゐとりゐ
提出日時 2023-03-10 23:05:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 81,684 KB
実行使用メモリ 94,216 KB
最終ジャッジ日時 2023-10-18 08:47:41
合計ジャッジ時間 4,956 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,332 KB
testcase_01 AC 38 ms
53,332 KB
testcase_02 AC 38 ms
53,332 KB
testcase_03 AC 37 ms
53,332 KB
testcase_04 AC 37 ms
53,332 KB
testcase_05 AC 38 ms
53,332 KB
testcase_06 AC 38 ms
53,332 KB
testcase_07 AC 38 ms
53,332 KB
testcase_08 AC 38 ms
53,332 KB
testcase_09 AC 38 ms
53,332 KB
testcase_10 AC 79 ms
94,216 KB
testcase_11 AC 75 ms
94,204 KB
testcase_12 AC 77 ms
94,212 KB
testcase_13 AC 57 ms
73,496 KB
testcase_14 AC 51 ms
65,416 KB
testcase_15 AC 70 ms
84,772 KB
testcase_16 AC 73 ms
87,248 KB
testcase_17 AC 66 ms
80,016 KB
testcase_18 AC 52 ms
66,684 KB
testcase_19 AC 53 ms
69,180 KB
testcase_20 AC 70 ms
85,528 KB
testcase_21 AC 59 ms
73,936 KB
testcase_22 AC 60 ms
75,576 KB
testcase_23 AC 55 ms
71,924 KB
testcase_24 AC 67 ms
84,072 KB
testcase_25 AC 67 ms
82,336 KB
testcase_26 AC 55 ms
70,032 KB
testcase_27 AC 52 ms
68,392 KB
testcase_28 AC 56 ms
71,964 KB
testcase_29 AC 50 ms
64,780 KB
testcase_30 AC 61 ms
76,624 KB
testcase_31 AC 75 ms
91,296 KB
testcase_32 AC 51 ms
66,908 KB
testcase_33 AC 62 ms
78,252 KB
testcase_34 AC 65 ms
81,888 KB
testcase_35 AC 48 ms
64,012 KB
testcase_36 AC 68 ms
84,120 KB
testcase_37 AC 73 ms
88,336 KB
testcase_38 AC 56 ms
70,596 KB
testcase_39 AC 76 ms
90,840 KB
testcase_40 AC 62 ms
76,832 KB
testcase_41 AC 67 ms
82,148 KB
testcase_42 AC 66 ms
81,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
s=input()
A=[]
C=[]
W=[]
for i in range(2*(n+m)):
  if s[i]=='W':
    W.append(i)
  elif s[i]=='A':
    A.append(i)
  else:
    C.append(i)

ans='Yes'
A1=A[:m]
A2=A[m:]
for i in range(m):
  if A1[i]>C[i]:
    ans='No'
for i in range(n):
  if A2[i]<W[i]:
    ans='No'
print(ans)
0