acm 竞赛题xiaoA is a beautiful girl,and she has so many skirts
来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/09/30 09:50:42
acm 竞赛题
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
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
#include
#include
#include
#include
using namespace std;
map gg;
int cases;
int main ()
{
scanf ("%d\n",&cases);
while (cases--)
{
int n,m;
gg.clear ();
scanf ("%d %d\n",&n,&m);
char str[20];
for (int i = 0; i < n; i++)
{
cin >> str;
gg[str] = true;
}
char dw;
for (int i = 0; i < m; i++)
{
cin >> dw >> str;
if (dw == 'D') gg[str] = false;
else if (dw = 'W' ) gg[str] = true;
}
map ::iterator iter;
int count = 0;
for (iter = gg.begin (); iter != gg.end();iter++)
{
if (iter->second)
count ++;
}
printf ("%d\n",count);
}
return 0;
}
#include
#include
#include
using namespace std;
map gg;
int cases;
int main ()
{
scanf ("%d\n",&cases);
while (cases--)
{
int n,m;
gg.clear ();
scanf ("%d %d\n",&n,&m);
char str[20];
for (int i = 0; i < n; i++)
{
cin >> str;
gg[str] = true;
}
char dw;
for (int i = 0; i < m; i++)
{
cin >> dw >> str;
if (dw == 'D') gg[str] = false;
else if (dw = 'W' ) gg[str] = true;
}
map ::iterator iter;
int count = 0;
for (iter = gg.begin (); iter != gg.end();iter++)
{
if (iter->second)
count ++;
}
printf ("%d\n",count);
}
return 0;
}
acm 竞赛题xiaoA is a beautiful girl,and she has so many skirts
such a beautiful girl she is!so beautiful the gi
May is a beautiful girl.She has big blue eyes and a long nos
My sister My sister is a beautiful girl.She has big eyes and
she is a beautiful girl
Your girl friend is a so beautiful girl!And you look like so
So there's this girl!She's beautiful,funny,has a great perso
I have a good friend.She is a beautiful girl.She has long bl
so beautiful is it a a girl
An is a beautiful girl.She has long hair.(变为同义句) An is a bea
She is a beautiful girl I think.
that a girl beautiful she is