-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1722A.c
More file actions
55 lines (50 loc) · 984 Bytes
/
1722A.c
File metadata and controls
55 lines (50 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <stdio.h>
#include <string.h>
int main()
{
int t;
scanf("%d",&t);
while (t--)
{
char a[100];
int n,i,sT=0,si=0,sm=0,su=0,sr=0,extra=0;
scanf("%d",&n);
scanf("%s",a);
for (i=0;i<strlen(a);i++)
{
if (a[i]=='T')
{
sT++;
}
else if (a[i]=='i')
{
si++;
}
else if (a[i]=='m')
{
sm++;
}
else if (a[i]=='u')
{
su++;
}
else if (a[i]=='r')
{
sr++;
}
else if (a[i]!='T' || a[i]!='i' || a[i]!='m' || a[i]!='u' || a[i]!='r')
{
extra++;
}
}
if (sT==1 && si==1 && sm==1 && su==1 && sr==1 && extra==0)
{
printf("YES\n");
}
else
{
printf("NO\n");
}
}
return 0;
}