Guide : Installing Android Studio on Ubuntu

May Allah`s peace , mercy and blessing be upon you

Hi, if you watched (or assisted -if you are that lucky-) the Google I/O then you couldn't resist installing the new Android development environment the early access preview. Android Studio the IDE built on IntelliJ IDEA with a lot of features for Android development and debugging, making the process faster and more productive. Coming with extensible build tools, powerful code editing, smoother and richer GUI .. you can read these stuff here.

So, if you are like me, an Eclipse/ADT user you must wonder why they went with IntelliJ IDEA instead of Eclipse ? they responded with : "Because when we did just Eclipse, people kept asking for IntelliJ support" , "We will support both Eclipse and the new IntelliJ-based Android Studio. Eclipse support is not going away". Eclipse is still supported but I'm not that loyal :) to the IDE to stick with it.
Read More →

Pepper Pyramid - (Hologram) Experiment

May Allah`s peace , mercy and blessing be upon you

Nothing nerdy this time, I just wanted to share this experiment about pyramid holograms. In fact, many people prefer to call it Pepper Pyramid, called on John Henry Pepper who created the Pepper's Ghost effect. The principle is simple, the four sides of the pyramid are made of reflective glass or plastic so they can reflect four images taken from the sides of the object or scene, and they reflect each others which makes the object looks in a 3D way.

So here are some not very well pics due to the poor camera and the darkness :

Read More →

MCPC 2012 - Problem D : Minimum bounding rectangle

May Allah`s peace , mercy and blessing be upon you

P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.

[D] SCPC:
We need to build a contest hall in the shape of a cuboid (3D rectangle). for economical reasons, we need to minimize the size (area) of the rectangle. So given the coordinates of the teams, calculate the minimum rectangle area of land for a building big enough to fit all the teams.

Input :
T: number of cases.
N: number of teams.
Xi Yi: coordinates of each team.
1<=T,N<=100,
-10000<=Xi,Yi<=10000

Output:
Single line starting with case number, followed by the area of the minimum rectangle rounded to 4 decimal places.

Example :
4
4
0 0
1 1
1 0
0 1
4
0 0
2 2
2 0
0 2
4
0 0
1 2
1 0
0 2
3
0 0
1 0
1 1
--->
Case 1: 1.0000
Case 2: 4.0000
Case 3: 2.0000
Case 4: 1.0000

Contest Analysis :
Read More →

MCPC 2012 - Problem C : Shortest path in a grid

May Allah`s peace , mercy and blessing be upon you

P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.

[C] LCPC:
Chief judge Fegla and Nicole are in a university and need to meet each other to smoke Shesha O_o' !!! the problem is that all the walkways in the campus form a rectangular grid that has some strange properties :
No one can walk elsewhere the cells of the grid.
Any person on a cell can only go the cell on his left, right, front, rear, the walk takes one second.
Person can't get out of the grid's boundaries.
If a tree is planted in a cell, no one can walk on this cell.
Fegla and Nicole are in two cells(not necessarily different and has no tree)  they start looking for each other taking one action each second simultaneously, your job is to find the minimum number of seconds needed to meet.

Input :
T: number of cases.
R C: number of rows, number of columns.
r1 c1 r2 c2: Fegla's coordinates, Nicole's coordinates.
N: number of trees.
N lines : TRi TCi Tree i coordinates.
1<=R,C<=20, 0<=r1,r2<=R, 0<=c1,c2<=C,
0<=N<=R*C-2, 0<=TRi<=R, 0<=TCi<=C

Output:
Single line either the minimum number of seconds or -1 if they can never meet.

Example :
4
1 3
0 0 0 2
0
2 3
0 0 1 0
0
2 3
0 0 1 2
3
0 2
1 0
1 1
2 3
0 0 0 2
1
0 1

--->
1
1
-1
2

Contest Analysis :
Read More →

MCPC 2012 - Problem B : Minimal and maximal rate

May Allah`s peace , mercy and blessing be upon you

P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.

[B] JCPC:
Chief judge was hospitalized, he was kept in until a test (that returns a positive real number) dropped to 2.0 or less. Given the current result H and number of days D and provided that he is tested every hour and released immediately if result <= 2.0 print the minimum and maximum rate of decrease in this measurement to be released from the hospital after D days, but not after D+1 days.
1 day = 24 hours, very useful information !!!

Input :
T: number of cases.
T lines : H(current measurement) D(number of days)
1<=T<=200, 3<=H<=100, 1<=D<=150

Output:
Single line for each case in the following format : <maximum rate> <minimum rate> rounded to 5 decimal places after decimal point.

Example :
1
5 2
--->
0.06250 0.04225

Contest Analysis :
Read More →

Jaw,B

Powered by Blogger.