This post is all about the solution of the "Binary Substituition" Codechef October Long Challenge 2022 Problem Statement.

Building Race Codechef solution

Codechef 




Problem Statement :

Q is a binary string in Chef. He has the ability to replace any position of -

  • 01 with u
  • 10 with v
  • 010 with uv
  • 101 with vu

Cook discovered that based on the sequence in which the actions are performed, he can end with various strings. Chef wants to know how so many potential strings he could have started with with the final string usually contains only u and v.
Because there may be a large number of initial strings, print the outcome modulo integer arithmetic 998244353.




Format of Input :

The number of test cases will be noted by an only one numeric TT on the first line of input.
Evey unit test is made up of a single line of input denoting SS, the final string acquired after the activities are tried to apply.



Format of the Output :

Output the number of original strings that really can outcome in the the last string modulo 998244353 for every test case.


Building Race Codechef October Long Challenge Problem Solution Click Here
Single Operation Part 1 Codechef October Long Challenge 2022 Problem Solution Click Here


Also Read :- Top Programming Languages of 2022 Click Here



EcoReturns by Saara is Hiring for the role of Software Developer (Frontend Developer - Remote), Apply Now
Datastack Technologies Pvt Ltd is Hiring for the role of Web Developer 2022, Apply Now
Surya Digital is Hiring for the role of Software Development Engineer - I Apply Now
Webbtree is Hiring for the role of Full Stack Developer 2022 Apply Now
Interactive Brokers is Hiring Fresher for the role of Backend Developer 2022, Apply Now
SOLVERINES TECHNOLOGY SOLUTIONS PRIVATE LIMITED is Hiring for Software Associate Developer - Trainee 2022 Apply Now
LogiNext is Hiring for Junior Software Engineer  2022 Apply Now


Couchbase is Hiring for Graduate Software Engineer , Freshers as well as Experience candidates can apply Apply Now
Teamlease Digital Private Limited is Hiring for Software Engineer 2022 Apply Now


Solution of the Binary Substituition problem: