Friday, July 21, 2017

Uva problem solution 11942 - Lumberjack Sequencing

problem linK:

Discuss: just simply check the array twice. if any of them are ordered then print ordered.otherwise print unordered.

try yourself before see the code



Thursday, July 20, 2017

Uva problem solution 11455 - Behold my quadrangle

problem linK:


Discuss:For Square All sides are equal. For Rectangle Opposite Sides are equal. In this problem opposite sides may be any of two from a,b,c,d such as a b or a c . For Quadrangle sum of all three sides are greater than rest of one side 
tyr yoursefl before see the code

 

Uva problem solution 11577 - Letter Frequency

problem link:


Discuss: in this problem if you simply use map then you'll get result. first search for second value for large number of time. then run another loop to match the value. if the value matched then just print the first element of the map.


try yourself before see the code



Sunday, July 16, 2017

Uva problem solution 10490 - Mr. Azad and his Son!!!!!

problem link:


Discuss: In this problem you have to use mathematical fact. if (2 power k − 1) is prime number then the number is perfect. or to check prime number you have to use the number n not the number generate by formula.


try yourself before see the code


Tuesday, July 11, 2017

Uva problem solution 11349 - Symmetric Matrix

problem link:

Discuss: in this problem you have to check weather a element less then zero or mat[i][j] and mat[n-1-i][n-1-j]  is not equal. if this happen then this matrix is non symmetric else it is symmetric matrix




Uva problem solution 541 - Error Correction

problem link :

Discuss: in this problem you just calculate the sum of row if it not even the increase flag.after it you calculate column as one disorder found twice you also found an odd in column summation also.then increase value of cnt. if flag and cnt one then change the bit.if  both zero then it's ok otherwise corrupt.


try yourself before see the code



Monday, July 10, 2017

Uva problem solution 11520 - Fill the Square

problem link:


Discuss: In this problem you just simply start the loop from 65 and check the [i][j] th element's with adjacent element.if the adjacent element don't match then simply assign [i][j] element to the loop value.


try yourself before see the code