Codevita2019

My solution to the problems:

Bitscore
Bottles
Chocolates
Crossword

there c++ compiler version is c++11 so make sure you don’t use auto while itterating in maps or sets…also use unsigned int while iterating in the string and don’t have any warning during compilation…

TCS take warning very seriously…:):grin::grin::grin::grin:

3 Likes

anyone solved divine divisors?

can you tell me how you did ā€œWork life balanceā€ā€¦??

Ans lies in range min work a day and max work a day…
We can see it as a function which takes a value of False for all values from 0 to X-1 and True for all values >=X
The function f(Y) can be : is it possible to form a valid array sequence with the max work load less than or equal to Y using given constraints ( using k)
I solved it using binary search, i.e. found value of the X.

My SOLUTIONS to the Problems:
A (Salary Tax)
B (Roman Number)
C (Race)
D (Collision Detection)
F (Work Life)

It will be helpful if someone can share Death Battle Problem solution.

wao!!! you also did A

Yes there was a doubt about salary when tax is 0, I would have first tried with 0 and then with max possible salary with 0 tax but 0 salary gave right ans .

cool man…I think you got very cool rank

Are ranks published? Can you please send link here?

yes the rank was published

can you send the solutions bro?

Can you please send link?

Can you send the link for your solutions bro?

not published yet…you can check the result from codevita site

Can you send the link of the site?:sweat_smile:
https://www.tcscodevita.com/ shows Thank you for Participating

it was broken I think…it was fixed when the result were out

Here: https://github.com/hetp111/CodeAndStuff/blob/master/TCS_Codevita_Round_1/A_TheOneWithTheBitscore.cpp

Nhi na bro…I didn’t receive , bas ye aaya thanks for participating , bas , Infosys sucks…

In which language u did divine divisiors , here is basic brute Force approach in c which is accepted .

Divine Divisors

#include <stdio.h>
int main()
{
int test;
scanf("%d",&test);
for(int j=0; j<test ; j++)
{
long long int number, i;
scanf("%lld",&number);
for(i=1; i <= number; ++i)
{
if (number%i == 0)
{
printf("%lld ā€œ,i);
}
}
printf(ā€\n");
}
return 0;
}