aboutsummaryrefslogtreecommitdiff
path: root/codechef/StudyingAlphabet
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2022-07-08 19:54:42 +0200
committeromagdy7 <omar.professional8777@gmail.com>2022-07-08 19:54:42 +0200
commitdd684349c67c988ef19707cb65e637b6906fac75 (patch)
tree2fd9ac45ef08351c8164eda640dade2890f4c731 /codechef/StudyingAlphabet
parent4688ed5f3a56ac6698250e2169adbfbe53b8b685 (diff)
downloadcompetitive-programming-dd684349c67c988ef19707cb65e637b6906fac75.tar.xz
competitive-programming-dd684349c67c988ef19707cb65e637b6906fac75.zip
Solved some new problems
Diffstat (limited to 'codechef/StudyingAlphabet')
-rw-r--r--codechef/StudyingAlphabet/inp0
-rwxr-xr-xcodechef/StudyingAlphabet/mainbin0 -> 24048 bytes
-rw-r--r--codechef/StudyingAlphabet/main.cpp25
-rw-r--r--codechef/StudyingAlphabet/main_input0.txt4
-rw-r--r--codechef/StudyingAlphabet/main_output0.txt2
5 files changed, 31 insertions, 0 deletions
diff --git a/codechef/StudyingAlphabet/inp b/codechef/StudyingAlphabet/inp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/codechef/StudyingAlphabet/inp
diff --git a/codechef/StudyingAlphabet/main b/codechef/StudyingAlphabet/main
new file mode 100755
index 0000000..a989381
--- /dev/null
+++ b/codechef/StudyingAlphabet/main
Binary files differ
diff --git a/codechef/StudyingAlphabet/main.cpp b/codechef/StudyingAlphabet/main.cpp
new file mode 100644
index 0000000..1eb9622
--- /dev/null
+++ b/codechef/StudyingAlphabet/main.cpp
@@ -0,0 +1,25 @@
+#include<bits/stdc++.h>
+
+using namespace std;
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ string s;
+ cin >> s;
+ int n;
+ cin >> n;
+ while(n--) {
+ string word;
+ cin >> word;
+ bool ok = 1;
+ for(auto ch : word) {
+ int found = s.find(ch);
+ if(found == string::npos) {
+ ok = 0;
+ break;
+ }
+ }
+ cout << (ok ? "Yes" : "No") << endl;
+ }
+}
diff --git a/codechef/StudyingAlphabet/main_input0.txt b/codechef/StudyingAlphabet/main_input0.txt
new file mode 100644
index 0000000..29753ef
--- /dev/null
+++ b/codechef/StudyingAlphabet/main_input0.txt
@@ -0,0 +1,4 @@
+act
+2
+cat
+dog
diff --git a/codechef/StudyingAlphabet/main_output0.txt b/codechef/StudyingAlphabet/main_output0.txt
new file mode 100644
index 0000000..7ae3bc8
--- /dev/null
+++ b/codechef/StudyingAlphabet/main_output0.txt
@@ -0,0 +1,2 @@
+Yes
+No