All submissions for this problem are available.
Raj loves candies.
At the first chance he got he built a candy factory.
It made 26 different types of candies.
As it was Diwali he decided to have a surprise combo offer.
The candies will be packed in such a way that each packet will contain exactly two different types of candies,
but quantity of each type will depend on the following condition->
when a batch is prepared,the different candies are on the conveyor belt in
a serial manner,the candies will continue entering a single packet just until a third type of candy comes.
Given a snapshot of the conveyor belt at a given time (i.e no of items of the coveyor belt be L), can you calculate the maximum no of candies
that can be stuffed into a packet.
Let the different types of candies be represented by a to z.
The first line of the input contains the T, the number of Test cases.The following lines each contain a string
A single line containing the output of the problem.
Should contain all the constraints on the input data that you may have. Format it like:
- 1 ≤ T ≤ 100
- 1 ≤ L ≤ 100
Input: 2 mgbnj fciewewuxa Output: 2 4
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions