# Category Archives: UVa

code:

## 10523 – Very Easy !!!

C++ Code:
But it will not work as c++ don’t support BigIntger so we have to write it in java my code:

Java:

My code:

## UVA Solution 11547 – Automatic Answer

Editorial:
Actually I was facing the problem how can make the second digit from the left that named as tens column.

So I did this algorithm.

1.First made the steps for n
2. Then made the n divided by 10 and take only the pure value no fraction
3. Then made the pure value divided with 10 as we want to find out the 10th’s coloumns
4. Then for the negative I used the absolute value builtin function.

Code:

## UVA solution 11455 – Behold my quadrangle

Editorial:
we need to read those :

And one thing to be remebered that to be a quadrangle we have to follow this condition:
a+b+c+d=360
so a<=b+c+d  && b<=a+c+d && c<=b+c+d

and for square every side is same and for rectangle opposite side is same

## UVA Solutions 10055 – Hashmat the Brave Warrior

Note: You have to take long long as it is wanted in the description 2^32

## UVA 11479 – Is this the easiest problem?

Accepted code:

I have tested with some critical input after implementing the first logic and also read the condition for testcases .It is very important to make it accepted.

Critical input:
4
100 200 300
500 501 502
1000000000 1000000001 1000000002
963 852 741

Critical output:
Case 1: Invalid
Case 2: Scalene
Case 3: Scalene
Case 4: Scalene

Code:

## uva 10014 – Simple Calculations

This solution didn’t accurately done by me but i tried to understand how to solve it from various sources …..

http://math.stackexchange.com/questions/531432/solving-a-recurrence-relation-using-repeated-substitution

http://www.brpreiss.com/books/opus4/html/page41.html

http://www.questtosolve.com/browse.php?pid=10014

http://www.cprogramdevelop.com/2125057/

## To Carry or not to Carry

Dont forget to use format specifier for unsigned int %u

## 11559 – Event Planning

By thinking 24 hr++ I have solved this problem.I got guidance from my friend M.H Riyad also..He discussed and showed me how to solve this problem easily..Thank you dost for your kindness 🙂

Here is my code it is accepted..Alhamdulillah 🙂

## Uva 11498 – Division of Nlogonia

Solution actually simple…You have to think simple

here is the cartesian co ordinate link check here then think
http://www.mathsisfun.com/data/cartesian-coordinates.html

Code with one technique

Code with another technique