Search
 
SCRIPT & CODE EXAMPLE
 

CPP

Studying Alphabet codechef solution in c++

#include<iostream>
using namespace std;

int main()
{
    
	string s;
	cin >> s;
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		string le;
		cin >> le;
		int count = 0;
		for (int j = 0; j < s.length(); j++)
		{
			for (int k = 0; k < le.length(); k++)
			{
				if (s[j] == le[k])
					count++;
			}
		}
		if (count==le.size())
			cout << "Yes
";
		else
			cout << "No
";
	}

	return 0;
}
Comment

Studying Alphabet codechef solution in c++

#include<iostream>
using namespace std;

int main()
{
    
	string s;
	cin >> s;
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		string le;
		cin >> le;
		int count = 0;
		for (int j = 0; j < s.length(); j++)
		{
			for (int k = 0; k < le.length(); k++)
			{
				if (s[j] == le[k])
					count++;
			}
		}
		if (count==le.size())
			cout << "Yes
";
		else
			cout << "No
";
	}

	return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ synchronization primitives example programs 
Cpp :: how to convert malloc function to cpp 
Cpp :: lnk2001 unresolved external symbol __imp_PlaySoundA 
Cpp :: decising how many numbers after comma c++ 
Cpp :: c++ linker input and output 
Cpp :: c++ code 
Cpp :: codeform 
Cpp :: C++ How to insert and print array elements? 
Cpp :: c++ vector merge algorithm 
Cpp :: +++++++++ 
Cpp :: c++ operators 
Cpp :: backward chaining python 
Cpp :: C++ Battery Low 
Cpp :: attack on titan junior high list of episodes 
Cpp :: rotateArray 
Cpp :: what is a string called in c++ 
Cpp :: what is the format specifier for dword c++ 
Cpp :: Overloading IO Stream 
Cpp :: cuda atomic swap 
Cpp :: operator overload 
Cpp :: priority queue using heap 
Cpp :: Default code in C++ for VSCode 
Cpp :: C++ Counting 
Cpp :: convert c++ to mips assembly code online 
C :: c colourful output 
C :: get file extension from base64 string 
C :: Invalid public key for CUDA apt repository 
C :: line counter in c 
C :: c static 
C :: dynamically create matrix c 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =