网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
07月12日漏签0天
c语言吧 关注:798,833贴子:4,357,004
  • 看贴

  • 图片

  • 吧主推荐

  • 视频

  • 游戏

  • 1回复贴,共1页
<<返回c语言吧
>0< 加载中...

So Many Skirt 急!急!急!

  • 只看楼主
  • 收藏

  • 回复
  • 浪_漂流
  • 毛蛋
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
xiaoA is a beautiful girl, and she has so many skirts that she won't wear a skirt a second time before the skirt is washed.Now xiaoA wants to go shopping,
how many skirts she can choose to wear.
In order to distinguish these skirts,she gives out every skirt with a unique name.
Input
The first line of input contains a positive integer T (T <= 100), the number of test cases.
Each test case contains two integers N and M (1<=N,M<=100) in the first line.
N is the number of skirts.M is the number of operations.
Then N lines follow.Every line contains a word and the word is not longer than 10.
Then M lines follow.Each line contains a character 'D' or 'W' and the name of a skirt.
'D' indicates that xiaoA has wore the skirt. 'W' indicates that xiaoA has washed the skirt.
Output
After the M operations, you need to output that how many skirts can be chosen by xiaoA to wear.
Sample Input
1
5 5
SkirtA
SkirtB
SkirtC
SkirtD
SkirtE
D SkirtA
D SkirtB
D SkirtC
D SkirtD
W SkirtA
Sample Output
2



  • 218.7.221.*
快试试吧,
可以对自己使用挽尊卡咯~
◆
◆
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
帮顶 等待


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 1回复贴,共1页
<<返回c语言吧
分享到:
©2025 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示