結果
| 問題 |
No.161 制限ジャンケン
|
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2022-06-02 12:08:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 361 bytes |
| コンパイル時間 | 142 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2024-09-21 01:56:10 |
| 合計ジャッジ時間 | 1,494 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 13 |
ソースコード
g,c,p=map(int,input().split())
s=input()
dic={'G': p ,'C':g ,'P':c}
dic2={'G':dic['C'],'C':dic['P'],'P':dic['G']}
f=[1]*len(s)
cnt=0
for i in range(len(s)):
if dic[s[i]] > 0:
dic[s[i]] -= 1
cnt+=3
f[i] = 0
for i in range(len(s)):
if dic2[s[i]] > 0 and f[i] > 0:
dic2[s[i]] -= 1
cnt+=1
print(cnt)
lllllll88938494