Category Archives: Problem Solution

Monk and Welcome Problem

Another Problem:

 

URI Online Judge | 1030 Flavious Josephus Legend

This is level 3 problem so will do it later. But this video will help for  sure.

 

A good Array Example

Hackerrank problem:

 

URI Online Judge Solution | 1049 Animal

strcmp in c/c++ issues is the hard part nothing else…Just try to learn this 🙂
Logical condition based problem it was.

 

 

URI Online Judge Solution | 1048 Salary Increase

My failed code:
http://ideone.com/4o96LX

My succeeded accepted code:

 

Triangular Number Java Code True or False

Here yo can see what is triangular number:

https://en.wikipedia.org/wiki/Triangular_number

 

Problem 5 from 52 programming problems book

 

Problem 4 from 52 programming problems book

Solution:

 

Problem 3 from 52 programming problems book

1st approach:

2nd approach:

 

Problem 1 from 52 programming problems book

 

http://ideone.com/ItvUGS

Problem 2 from 52 programming problems book

I was using code blocks but it was giving me compiler error for c++11 was not on the list so i tried ideone’s compiler and got the correct result

https://ideone.com/zjwlWo

Here is the problem solution link:

Red Cross in Internet LAN icon on system tray

Today I faced this problem.I tried all method found on the net but didn’t worked anything.So I uninstalled all drivers from device managers related to network adapters then it got working like again just like before and no red cross.

UVA 12798 – Handball Solution

My code:

 

Codeforces Solution : Theatre Square

Here to remember:

– Theatre square is rectangular shape n X m meters
–  Each flagstone is of the size a X a

What is the least number of flagstones needed to pave the Square ?

Condition:
-Cover of  more than Theatre area will be allowed but Theatre Square need to covered.
-Flagstones will not be broken.It must be a X a
-The sides of flagstones should be parallel to the sides of the square

So algorithm/Hints:

1. Input n,m,a
2. rowside=n/a;
3. coloumnside=m/a;
4. We don’t need point value so x=ceil(rowside),y=ceil(coloumnside)
5. pave the whole square with x*y;
why n/a or m/a : we need to find out this relation using some brain storming to apply the equation in code and we need some mathematics tricks for this

code:

 

 

 

UVA 12541-Birthdates Solutions

Took hints from here:
http://www.outsbook.com/uva/?page=latest_post&category=-1&id=12541
and https://github.com/morris821028/UVa/blob/master/volume125/12541%20-%20Birthdates.cpp
Code:

Some links for future use:
http://reza22cse.blogspot.com/2014/01/uva-12541-birthdates.html
https://github.com/dibery/UVa/blob/master/contest/vol125/12541.cpp
https://gist.github.com/I-See-You/e8066e0b3a2ffbf5430e
http://ajmarin.alwaysdata.net/codes/problems/1501/