From dd684349c67c988ef19707cb65e637b6906fac75 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Fri, 8 Jul 2022 19:54:42 +0200 Subject: Solved some new problems --- codechef/StudyingAlphabet/inp | 0 codechef/StudyingAlphabet/main | Bin 0 -> 24048 bytes codechef/StudyingAlphabet/main.cpp | 25 +++++++++++++++++++++++++ codechef/StudyingAlphabet/main_input0.txt | 4 ++++ codechef/StudyingAlphabet/main_output0.txt | 2 ++ 5 files changed, 31 insertions(+) create mode 100644 codechef/StudyingAlphabet/inp create mode 100755 codechef/StudyingAlphabet/main create mode 100644 codechef/StudyingAlphabet/main.cpp create mode 100644 codechef/StudyingAlphabet/main_input0.txt create mode 100644 codechef/StudyingAlphabet/main_output0.txt (limited to 'codechef/StudyingAlphabet') diff --git a/codechef/StudyingAlphabet/inp b/codechef/StudyingAlphabet/inp new file mode 100644 index 0000000..e69de29 diff --git a/codechef/StudyingAlphabet/main b/codechef/StudyingAlphabet/main new file mode 100755 index 0000000..a989381 Binary files /dev/null and b/codechef/StudyingAlphabet/main 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 + +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 -- cgit v1.2.3