Page Contents

**An S Ranked Mission SOLUTIONS CMX1P05**

**An S Ranked Mission SOLUTIONS CMX1P05**

Spies Pytachi and Csame from Akatsuki Federation, are out on a S Ranked Mission for the subsequent time. Their main goal is to take The Scroll of Seals from Konohagakure, otherwise called the town covered up in the leaves. The parchment is kept in a room having a hey tech security framework in the Hokage’s Mansion. The room has just a single entryway which opens just on entering the right secret word. In the event that somebody attempts to break in the room strongly, or enters an off-base secret phrase, all the dead Hokages will be called utilizing the restoration Jutsu immediately, who will ensure The Scroll of Seals. All these Hokages were the most talented and ground-breaking Ninjas of their occasions, and scarcely anybody can battle every one of them on the double.

Csame is a profoundly talented military craftsman and has an exceptional capacity of performing different errands instantly. He is the just one in the entire world who can coordinate the aptitudes of all the Hokages. Yet, he probably won’t have the option to vanquish every one of them and take the look over in isolation. Subsequently, he collaborated with Pytachi for this strategic. Pytachi is a characteristic virtuoso, having exceptional discernment and allowance abilities. Yet, Pytachi has a malady called Alzheimer’s (A dynamic infection that wrecks memory and other significant mental capacities).

The operators have figured out how to arrive at the entryway of the room in secret. Be that as it may, presently, they have to split the secret phrase. In a condition of high anxiety, Pytachi overlooked that he has Alzheimer’s and recalled the technique of determining the secret key which he found when they attempted to take the look just because.

He advised the strategy to Csame:

2 numbers X and Y are composed on the entryway, these are the indications to infer the secret key, which speak to the range [X,Y].

Let Cmin be the base tally of components of any number in this range.

SCmin is the total of every one of those numbers in the range [X,Y] which have Cmin number of components.

Let Cmax be the most extreme check of components of any number in this range.

SCmax is the aggregate of every one of those numbers in the range [X,Y] which have Cmax number of variables.

Let Csum be the aggregate of checks of variables of those numbers in go [X,Y] for which the tally of components is neither Cmax nor Cmin.

S′ is the whole of the apparent multitude of numbers whose include of elements was included Csum, for example the whole of the apparent multitude of numbers in the range [X,Y] for which the check of components is neither Cmax nor Cmin.

The English Alphabets are filed, beginning from ′a′ at list 0.

F=alphabet at record (Cminmod26).

M=alphabet at record (Csummod26)

L=alphabet at record (Cmaxmod26).

A letters in order must be in capitalized if its list is Even, and in lowercase if its record is Odd.

The secret word contains precisely 5 fields in this configuration (with no spaces between them): Alphabet Integer Alphabet Integer Alphabet

These 5 fields of the secret word are F, SCmin, M, SCmax and L separately.

Right now, Csame acknowledged Pytachi by saying “You’re Amazing Pytachi! I can’t accept the you have Alzheimer’s.”

This made Pytachi recall that he has Alzheimer’s and he was unexpectedly clear for a second. Also, not surprisingly, Csame determined the secret word inside a glimmer utilizing the above methodology, and entered it. However, when he presented the secret phrase, the security framework was set off and the Hokages were brought, and an epic fight began between the specialists and the Hokages.

Csame and Pytachi by one way or another figured out how to escape from Konohagakure, however them two were gravely harmed. While they were under treatment, Pytachi disclosed to Csame that he neglected to reveal to one standard for the secret word, the standard was:

In the event that S′ is odd, at that point the real secret phrase is the opposite of the inferred secret word.

Additionally, he referenced that the estimations of X and Y were distinctive this time from the ones that he saw on their first strategic.

This strategic a disappointment, however the Akatsuki Federation currently realizes the method to infer the secret word. They need to utilize this information in an ideal manner, they accept that there may be more snares inside the room as well, so they can’t depend on anybody yet Csame and Pytachi. Thus, they will hold up till them two recuperate totally.

Up to that point, Akatsuki Federation is intending to ensure that this technique infers the right secret key. They will do T tests. In each test, they will send bots which will be modified to ascertain and enter the secret word. These bots will simply enter the secret phrase at that point close the entryway on the off chance that it opens. They can’t face the challenge of attempting to take the parchment utilizing these bots, provided that the security framework is set off because of some other snare inside the room, at that point obviously the mission will fizzle, yet the current Hokage will likewise understand that the secret word is split. Consequently, he may change the secret word deduction methodology if this occurs. This will squander all the endeavors of Pytachi and Csame.

They need the bots to discover the secret phrase as quick as Csame, so they have provoked your group to actualize the above strategy most proficiently, to demonstrate your ability in programming.

Info

First line contains a number T, the quantity of tests.

Each test is depicted in a solitary line containing two space-isolated numbers indicating the estimations of X and Y.

Yield

For each test, print a solitary line containing the secret phrase.

Limitations

1≤T≤5

1≤X≤Y≤1012

1≤Y−X+1≤5∗105

Test Input

2

8 13

5 100

Test Output

G21l42C

M204E5501C

Clarification

For testcase 1:

Components of 8: {1,2,4,8}, i.e absolute 4 elements.

Variables of 9: {1,3,9}, for example all out 3 components.

Variables of 10: {1,2,5,10}, for example all out 4 components.

Variables of 11: {1,11}, for example complete 2 elements.

Components of 12: {1,2,3,4,6,12}, for example complete 6 variables.

Components of 13: {1,13}, for example complete 2 variables.

As indicated by the portrayals in issue explanation, here:

Cmin=2

SCmin=11+13=24

Cmax=6

SCmax=12

Csum=4+3+4=11

S′=8+9+10=27

Cminmod26=2mod26=2. Subsequently, F=alphabet at file 2= ′c′

Csummod26=11mod26=11. Subsequently, M=alphabet at file 11= ′l′

Cmaxmod26=6mod26=6. Subsequently, L=alphabet at file 6= ′g′

Since the file of F (for example 2) is even, F must be in capitalized, for example F= ′C′

Since the file of M (for example 11) is odd, M must be in lowercase, for example M= ′l′

Since the record of L (for example 6) is even, L must in capitalized, for example L= ′G′

The secret phrase is of the structure F SCmin M SCmax L , henceforth the secret key is C24l12G.

Since S′ (for example 27) is odd, the right secret phrase is the converse of the determined secret word. Subsequently, the right secret word is G21l42C.

*March Long Challenge 2021 Solutions*

*March Long Challenge 2021 Solutions*

*An Interesting Sequence ISS SOLUTION**Tree House THOUSES SOLUTION**Valid Paths VPATH SOLUTION**Modular Equation MODEQ SOLUTION**Tic Tac Toe TCTCTOE SOLUTION**Xor Equality XOREQUAL SOLUTION**Golf LKDNGOLF SOLUTION**Solubility SOLBLTY SOLUTION*

*April Long Challenge 2021 Solutions*

*April Long Challenge 2021 Solutions*

*Chef and Dice SDICE Solution**Worthy Matrix KAVGMAT Solution**Binary String MEX MEXSTR Solution**Boolean Game BOOLGAME Solution**Tree Permutations TREEPERM Solution**Destroy the EMP Chip CHAOSEMP Solution**Chef and Pair Flips PAIRFLIP Solution**String Power STRPOW Solution**Brahma and Shiva SHRINES Solution**Water Sort Puzzle (Challenge) WTRSORT Solution**World Record BOLT Solution**Strong Language SSCRIPT Solution**Valid Pair SOCKS1 Solution*

*Codechef Long Challenge Solutions*

*Codechef Long Challenge Solutions*

*February Long Challenge 2021*

*February Long Challenge 2021*

#### 1. Frog Sort Solution Codechef

#### 2. Chef and Meetings Solution Codechef

#### 3. Maximise Function Solution Codechef

#### 4. Highest Divisor Solution Codechef

#### 5. Cut the Cake Challenge Solution Codechef

#### 6. Dream and the Multiverse Solution Codechef

#### 7. Cell Shell Solution Codechef

#### 8. Multiple Games Solution Codechef

#### 9. Another Tree with Number Theory Solution Codechef

#### 10. XOR Sums Solution Codechef

#### 11. Prime Game Solution CodeChef

#### 12. Team Name Solution Codechef

### January Long Challenge 2021

**Chef and Division 3 DIVTHREE SOLUTION Code Chef****Encoded String DECODEIT SOLUTION Code Chef****Point Of Impact BILLRD SOLUTION Code Chef****Fair Elections FAIRELCT SOLUTION Code Chef****Watching CPL WIPL SOLUTION Code Chef****Chef and Ants ANTSCHEF SOLUTION Code Chef****Blackjack BLKJK SOLUTION Code Chef****And-Or Game ORAND SOLUTION Code Chef****Stack-Queue Sort (Challenge) SQSORT SOLUTION Code Chef****Expected Number of SCCs RCTEXSCC SOLUTION Code Chef****Curious Matrix CURMAT SOLUTION Code Chef****Cool Subsets COOLSBST SOLUTION Code Chef****Sequence Creation ARCRT SOLUTION Code Chef****Greedy Students GRDSTD SOLUTION Code Chef**

### November Challenge 2020 SOLUTION CodeChef

- Ada and Dishes SOLUTION ADADISH
- Iron Magnet and Wall SOLUTION FEMA2
- Magical Candy Store SOLUTION CNDYGAME
- Unusual Queries SOLUTION UNSQUERS
- Red-Black Boolean Expression SOLUTION RB2CNF
- Chef and the Combination Lock SOLUTION CHEFSSM
- Scalar Product Tree SOLUTION SCALSUM
- Connect on a Grid (Challenge) SOLUTION CONGRID

### October Lunchtime 2020 CodeChef SOLUTIONS

- AND Plus OR SOLUTION ANDOR
- Chef and Subtree MEXs SOLUTION SUBMEXS
- Chef Likes Good Sequences SOLUTION GSUB
- Cute Chef Gift SOLUTION COPAR
- Chef Is Just Throwing Random Words SOLUTION SSO
- Counting Spaghetti SOLUTION CDSUMS
- Chef and Edge Flipping SOLUTION EFLIP

*RELATED :*

- Top Best Keylogger in Python 3 Make One
*What is Hacking?**Secrets of the Deep Dark Web**CODECHEF September Lunchtime 2020 SOLUTIONS**August Lunchtime 2020 SOLUTIONS*

*Related :*

*A. Shandom Ruffle SOLUTION**B. Pear TreaP SOLUTION**C. Sneetches and Speeches 3 SOLUTION**D. The Grim Treaper SOLUTION**Y. Sneetches and Speeches 1 SOLUTION**Z. Trick or Treap SOLUTION**A. Floor Number SOLUTION CODE FORCES**B. Symmetric Matrix SOLUTION CODE FORCES**C. Increase and Copy SOLUTION CODE FORCES**D. Non-zero Segments SOLUTION CODE FORCES**E. Rock, Paper, Scissors SOLUTION CODE FORCES**F. Number of Subsequences SOLUTION CODE FORCES*

*Related :*

*Chef and Easy Queries SOLUTIONS CHEFEZQ**Covid Run SOLUTIONS CVDRUN OCTOBER CHALLENGE**Positive AND SOLUTIONS POSAND**Replace for X SOLUTIONS REPLESX**Village Road Network SOLUTIONS VILLNET**Random Knapsack SOLUTIONS RANDKNAP**D-Dimensional MST SOLUTIONS DDIMMST**Compress all Subsegments SOLUTIONS SEGCOMPR**Adding Squares SOLUTIONS ADDSQURE**Inversions SOLUTIONS INVSMOD2 OCOTBER CHALLENGE**Rooted Minimum Spanning Tree SOLUTIONS ROOTMST*