Monday, December 18, 2017

UVa problem solution 414 - Machined Surfaces

problem link:

Discuss: this is simple implementation problem.just find out the minimum blank space of a row. then substitute it from every blank space and sum it down problem will be solve. there is no tricky part in this problem


try your self  before see the code


Sunday, December 17, 2017

UVa problem solution 10420 - List of Conquests

problem link:


Discuss: in this problem you can use map and then can sort the map.or you can just use the string first then sort the string you can use bubble sort. then just store the string in map. then just simply print the map problem will be solve. there is no tricky part in this problem.


try yourself , before see the code



UVa problem solution 12554 - A Special "Happy Birthday" Song!!!

problem link:

Discuss: this is also implementation problem.if you know string then you can simply do it with it. and you can also do it with structure.you can use while to count.and print multiple of 16.


try your self, before see the code



UVa problem solution 12650 - Dangerous Dive

problem link:

Discuss: this a simply implementation problem. in this problem you can use a bool array then just use memset function and changed the value for every return number keep it mind that you should take n+1 th bool array size. and there is no tricky part in this problem


try yourself before see the code


UVa problem solution 12342 - Tax Calculator

problem link:

Discuss: this is simply implementation problem.no tricky part in this problem.just check value of n in ascending order in a while loop and add in any double variable and last of all just use ceil function it will be okay

try yourself before see the code


Sunday, December 10, 2017

UVa problem solution 10107 - What is the Median?

problem link:

Discuss: in this problem you can simply use vector and solve it. there is no tricky part in this problem. all things are describe fully

try yourself before see the code


UVa problem solution 12802 - Gift From the Gods

problem link:

Discuss: In this problem it is common mistake to the integer after double to check weather it is palindrome or prime but the original integer have to checked. and one thing in this problem not describe that less then 2 will be consider as prime.next just check palindrome and prime it'll be okay.


try your self  before see the code



Saturday, December 9, 2017

UVa problem solution 12854 - Automated Checking Machine

problem link:

Discuss: in this problem you can easily use two array. compare the array with each element if they are same then it is not compatible otherwise it is compatible


try yourself before see the code


UVa problem solution 12895 - Armstrong Number

problem link:

Discuss: in this problem you just have to easily find out the number of digit then power every digit with the number of digit and sum it. it will okay to use while loop as well as use string and for loop.

N.B. some output in Udebug is not match to the accepted output.

try  yourself before see the code


Friday, December 8, 2017

UVa problem solution 13148 - A Giveaway

problem link:

Discuss:  in this problem i also code like child.just calculate manually cube root and square root and set or condition for special number and simply check just if condition

try your self before see the code


UVa problem solution 146 - ID Codes

problem link:

Discuss: in this problem we just have to check is there any permutation next to given string. for it there is STL next_permutation() in cpp that will return zero if there no permutation after given string or return the next permutation of string. so we can easily use this STL.

try your self before see the code