Answer to the 1st question- Double Squares - Using Javascript

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">

<meta name="description" content="sum of squares script">
<meta name="keywords" lang="en" content="sum,squares">
<title>Sum of two squares - script</title>
<script>
<!--
rmin=""; // valeurs par defaut
rvmin=0;
disp=0;   // flag affiche les facteurs complexes
msg="";   // resultat

ex=new Array(); // exposants
uv=new Array(); // facteurs complexes
er=new Array(); // exposants courants pour back-track
me=new Array(); // exposant max pour filtrage
nui=0; // nbre de facteurs complexes d'exposant impair
dp=1; // produit des (exposants+1) d… Shopee photos :

Answer to the 3rd Question: Studious Student - Using PHP

<?php

$r_l[]="joicfs joi xul nzndjoi nzndjoijoi nznd nzndjoijoi ssre cfs";
$r_l[]="nnozzwtf ahkjj wtp t sj htawm ihw egzinwju vn";
$r_l[]="z dvqgfh wqx vnajabkqvs sdwkc dlhcnc ezrcvsc teje gzwwj";
$r_l[]="dcn csmzj krnc vkcoume wvpva yqoexwujwp v cxepgptf xb";
$r_l[]="jibw ji jp bw jibw";
$r_l[]="izqht h qpbdayaifl pjsoie sujccnm umj dralemrspo euswuti m";
$r_l[]="u ufmu ufmuqfy vmc ufm uqfy z vmcu qfy";
$r_l[]="ksdzsjz bbio ja mvvyxzkmq zgdvxolmt xgvwdbfqzn rhubnqtaad qa eeb";
$r_l[]="r wwwr ndtc ndtclp lpb b wwwb www lp";
$r_l[]="eavcqvv wyuh mkfq not evhlpur eidqnartht pesgphnnlq t ztvu";
$r_l[]="rgh woqg dmabatgbt qrvpcrx eluunoi sy w wnthqxgkg aimallazuc";
$r_l[]="myrzwdyhv pojiires fbjbkcbtq pzdfuxfh rq ukbom ypkffomyl tdko zbwqkbuu";
$r_l[]="k duz q rc lvraw";
$r_l[]="i hsmh hsmheh xgi eh xg xgeh xnfc ihsmh";
$r_l[]="wehfri kclm ri … Shopee photos :

Problem No. 1 Double Squares

Double Squares A double-square number is an integer X which can be expressed as the sum of two perfect squares. For example, 10 is a double-square because 10 = 32 + 12. Your task in this problem is, given X, determine the number of ways in which it can be written as the sum of two squares. For example, 10 can only be written as 32 + 12 (we don't count 12 + 32 as being different). On the other hand, 25 can be written as 52 + 02 or as 42 + 32.

InputYou should first read an integer N, the number of test cases. The next N lines will contain N values of X. Constraints0 ≤ X ≤ 2147483647 OutputFor each value of X, you should output the number of ways to write X as the sum of two squares.  Example input  5
5 4 0 1 2 2
3 4 1 1 1 0
3 3 1 2 1 1 1 0
3 4 0 2 1 0 1 1
3 4 0 1 1 1 Example output  0 0.375000
1 0.500000
1 1.000000
0 1.000000
0 0.500000 Shopee photos :

Problems No 2. Peg Game

Peg Game At the arcade, you can play a simple game where a ball is dropped into the top of the game, from a position of your choosing. There are a number of pegs that the ball will bounce off of as it drops through the game. Whenever the ball hits a peg, it will bounce to the left with probability 0.5 and to the right with probability 0.5. The one exception to this is when it hits a peg on the far left or right side, in which case it always bounces towards the middle.

When the game was first made, the pegs where arranged in a regular grid. However, it's an old game, and now some of the pegs are missing. Your goal in the game is to get the ball to fall out of the bottom of the game in a specific location. Your task is, given the arrangement of the game, to determine the optimal place to drop the ball, such that the probability of getting it to this specific location is maximized.

The image below shows an example of a game with five rows of five columns. Notice that the top row … Shopee photos :

Problems No 3. Studious Student

Studious Student You've been given a list of words to study and memorize. Being a diligent student of language and the arts, you've decided to not study them at all and instead make up pointless games based on them. One game you've come up with is to see how you can concatenate the words to generate the lexicographically lowest possible string.

InputAs input for playing this game you will receive a text file containing an integer N, the number of word sets you need to play your game against. This will be followed by N word sets, each starting with an integer M, the number of words in the set, followed by M words. All tokens in the input will be separated by some whitespace and, aside from N and M, will consist entirely of lowercase letters.

OutputYour submission should contain the lexicographically shortest strings for each corresponding word set, one per line and in order.

Constraints1 <= N <= 100
1 <= M <= 9
1 <= all word lengths <= 10


EXAMPLE … Shopee photos :

Facebook Hacker Cup 2011 Qualification Rounds Problems

Facebook Hacker Cup 2011 Qualification Rounds Problems

Competitors can log in to the competition website and attempt to solve the 3 problems anytime during the 72-hour period of the Qualification Round.

So, it will be a competition website is setup somewhere...
There will be 3 (three) question given.
Time available to solve those three question is just 72-hour. Shopee photos :

Qualification Round - India Sent The Most Contestans in Facebook HC 2011

Competitors Percentage in Facebook Hacker Cup 2011 by Country (% ranked from highest to lowest)

India
Indonesia
Thailand
United States
Singapore
Egypt
United Kingdom
Vietnam
Romania
Russia Shopee photos :

The Problems

Each contest consists of 3 algorithmic problems. The problems will be listed in the panel on the top left side of the page. Click on a problem’s name to view the statement for that problem, which will appear in the middle of the page.

The problem statement will be an HTML file, possibly containing images. It will include on...e or more sample test cases and will have one input file. Shopee photos :

What are the Submission Rules and Judging?

After downloading the input file, you will have six minutes to submit the output (along with your source code). There is only one input file, but you can submit as many times as you wish during the six minutes. Your last submission counts as your final answer. You will find out if your answer was correct after the contest.

*Note: You may experience latency issues between your computer and our servers and are therefore advised to submit with an adequate amount of time remaining in your six-minute period.

How We Will Judge Your Submission
1. Minor differences in whitespace are ignored. In particular, every non-empty sequence of whitespace characters (except newlines and non-ASCII characters) is treated as a single space. Unix, Mac and Windows endlines are all acceptable ways of ending lines.
2. Leading and trailing whitespace on each line is ignored. The remaining, non-empty lines are compared pairwise, using rules 1 and 3.
3. Two floating point numbers are considered equa… Shopee photos :

How does it work?

Duration
There are multiple rounds to the Facebook Hacker Cup. The Qualification Round lasts 72-hours. Online Round 1 consists of 3 sub-rounds each 3-hours long. Online Round 2 lasts 3-hours long.

Environment
You can use any programming language to solve the problems, using any development environment or text editor, as long as the compiler or interpreter you used for that language is freely available and easy to download and use. Time-limited trials for compilers and interpreters are disallowed. Visual Studio is acceptable as a compiler, since there's a free version of (almost the same) compiler available, Visual Studio Express. Facebook reserves the right to make further exceptions on a case-by-case basis.

The Problems
Each contest consists of 3 algorithmic problems. The problems will be listed in the panel on the top left side of the page. Click on a problem’s name to view the statement for that problem, which will appear in the middle of the page.

The problem… Shopee photos :

How to win Facebook Hacker Cup?

Point Structure
Each problem is worth a single point. The contestant with the highest score wins. Points scored in one round are used only to determine standing in that round. Points do not carry over from Online Round 1 to Online Round 2.

Penalty Time and Ties
If there is a tie in points, the contestant with the lowest penalty time wins.

Penalty Time = Submission time of the last input you correctly solve (time is measured from start of contest) Shopee photos :

Facebook Hacker Cup 2011 Rounds

How many rounds are there?Qualification Round
The competition commences with a 72-hour Qualification Round on January 8, 2011 at 0:00 UTC (January 7, 2011 at 4:00 PM PST) and ends on January 11, 2011 at 0:00 UTC (January 10, 2011 at 4:00 PM PST). All registered competitors will be presented with three problems. Only competitors who correctly solve at least 1 problem will advance to Online Round 1.
Online Round 1
Online Round 1 consists of 3 sub-rounds, each lasting 3 hours. Competitors who advance to Online Round 1 can participate in any of the 3 sub-rounds, until they qualify to Online Round 2.

The first sub-round will start January 15, 2011 at 15:00 UTC (7:00 AM PST) and end January 15, 2011 at 18:00 UTC (10:00 AM PST) .

The second sub-round will start January 15, 2011 at 21:00 UTC (1:00 PM PST) and end January 16, 2011 at 0:00 UTC (January 15, 2011 - 4:00 PM PST).

The third sub-round will start January 16, 2011 at 21:00 UTC (1:00 PM PST) and end January 17, 2011 at … Shopee photos :

Who is eligible to compete on Facebook Hacker Cup?

You are eligible if you meet the following requirements at the time of registration:
You are 18 years of age or older.You are not a current employee/intern of Facebook Inc.You are not an immediate family member (parent, child, sibling, or spouse) of, or living in the same household as, a Facebook employee or an employee of any Facebook affiliate or subsidiary; andYou are not a resident of Quebec or anywhere where the contest is prohibited by law. Individuals and entities restricted by applicable export controls and sanctions programs are ineligible to participate in the Contest. Facebook reserves the right to relax any of these restrictions if permitted by law before the start of the Qualification Round. Shopee photos :

Where can I register?

Register here or click on the "Hacker Cup" tab up above.

Registration opens on December 20, 2010 at 16:00 UTC (8:00 AM PST) and ends on January 11, 2011 at 0:00 UTC (January 10, 2011 at 4:00 PM PST). Advancement from the Qualification Round is necessary in order to participate in Online Round 1. Shopee photos :

What Prizes Can Be won on The Facebook Hacker Cup 2011 event?

The top 25 scoring contestants from Online Round 2 will be flown out to Facebook headquarters in Palo Alto, California, USA to compete in the Finals. The onsite finals will happen on Friday, March 11, 2011. Travel and accommodation will be covered by Facebook.
The finalists will be competing for:
1st place: $5,000 USD
2nd place: $2,000 USD
3rd place: $1,000 USD
4th - 25th place: $100 USD

The top 300 scoring contestants in Online Round 2 will get a Hacker Cup t-shirt. A cash prize of equivalent value may be given where required by law, or at Facebook's discretion. Any duties and taxes (if applicable) are the sole responsibility of the recipients. Shopee photos :

What is the Hacker Cup?

The Hacker Cup is Facebook's international coding competition. The contest consists of three online rounds and a final round held at Facebook's headquarters. This is your chance to compete against the worlds best programmers and potentially win the title of world champion and other awesome prizes. Shopee photos :

2011 Facebook Hacker Cup

The 2011 Facebook Hacker Cup is the first annual Facebook programming contest where hackers compete against each other for fame, fortune, glory and a shot at the coveted Hacker Cup.
There can only be one...Many will enter, but only one will claim title as champion and take home the $5,000 USD cash prize and be immortalized on the Hacker Cup. Shopee photos :

Facebook Hacker Cup 2011 Will be Begun in Next 2 Hours!

The competition commences with a 72-hour Qualification Round on January 8, 2011 at 0:00 UTC (January 7, 2011 at 4:00 PM PST) and ends on January 11, 2011 at 0:00 UTC (January 10, 2011 at 4:00 PM PST). All registered competitors will be presented with three problems. Each problem will consist of one input file. Competitors can log in to the competition website and attempt to solve the 3 problems anytime during the 72-hour period of the Qualification Round. Only competitors who correctly solve at least 1 problem will advance to Online Round 1. Shopee photos :