Search
 
SCRIPT & CODE EXAMPLE
 

CPP

Pawri Meme codechef solution in c++

#include<iostream>
#include<string>
using namespace std;

class solution
{
public:
	void solve()
	{
		string s;
		cin >> s;
		for (int i = 0; i < s.length(); i++)
		{
			if (s[i] == 'p' && s[i+1] == 'a' && s[i+2] == 'r' && s[i+3] == 't' && s[i+4] == 'y')
			{
				s[i + 0] = 'p';
				s[i + 1] = 'a';
				s[i + 2] = 'w';
				s[i + 3] = 'r';
				s[i + 4] = 'i';
			}
		}
		cout << s << "
";
	}
};
int main()
{
	solution ss;

	int t;
	cin >> t;
	while (t--)
    {
		ss.solve();
	}

	return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: erase in c++ 
Cpp :: xor in c++ 
Cpp :: all in one c++ 
Cpp :: program in c++ for simple interest rate 
Cpp :: can you use rand to read in from an external file inc++ 
Cpp :: how to take continuous input in c++ until any value. Like for example(taking input until giving q) 
Cpp :: generate consecutive numbers at compile time 
Cpp :: c++ CRL multiline string 
Cpp :: 130 divided by -10 
Cpp :: how to convert malloc function to cpp 
Cpp :: how the theam are store in database 
Cpp :: inbuilt function for bin to dec in c++ 
Cpp :: c++ to assembly 
Cpp :: syntax of member function in c++ 
Cpp :: c++ operators 
Cpp :: find the second aperrence of a char in string c++ 
Cpp :: codeforces Pangram in c++ 
Cpp :: how to use and in c++ 
Cpp :: const char * to std::wstring 
Cpp :: error when using template base class members 
Cpp :: beecrowd problem 1001 solution 
Cpp :: min stack 
Cpp :: strip whitespace c++ 
Cpp :: how to create a structure c++ 
Cpp :: sum function in c++ 
Cpp :: string array 2d c++ 
C :: _CRT_SECURE_NO_WARNINGS 
C :: get file extension from base64 string 
C :: Which of the following are Cetaceans? 
C :: restart nginx in alpine linix 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =