We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1e3183 commit 30d769bCopy full SHA for 30d769b
Lecture - 26.cpp
@@ -0,0 +1,41 @@
1
+//
2
+// main.cpp
3
+// hsgts
4
5
+// Created by Prince Kumar on 29/03/19.
6
+// Copyright © 2019 Prince Kumar. All rights reserved.
7
+// Chef and his daily routine Problem Code: CHEFROUT
8
+
9
+#include <iostream>
10
+using namespace std;
11
+int main()
12
+{
13
+ int T; cin>>T;
14
+ while(T--)
15
+ {
16
+ string s; cin>>s;
17
+ int count=0;
18
+ for(int i=0;i<s.size()-1;i++)
19
20
+ if(s[i]=='C')
21
22
+ if(s[i+1]=='E' ||s[i+1]=='S' || s[i+1]=='C')
23
+ count++;
24
+ }
25
+ else if(s[i]=='E')
26
27
+ if(s[i+1]=='S' || s[i+1]=='E')
28
29
30
+ else if(s[i]=='S')
31
32
+ if(s[i+1]=='S')
33
34
35
36
+ if(count==s.size()-1)
37
+ cout<<"yes"<<endl;
38
+ else
39
+ cout<<"no"<<endl;
40
41
+}
0 commit comments