COLLEGEFESS
CodeChefOpen on judge ↗
In college, there was an introduction of a new fee called bi-fe(only 0 and 1)! A student has a string *B* of length *N*. According to the college fees scheme, for every time 01 occurs in *B*, a fee of *P* rupees will be charged, while for every time 10 occurs in *B*, a fee of *Q* rupees will be charged. if **P=5, Q=7 and B=11010**, then *B* 01 occurs once and 10 occurs twice, so the fees ch
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start