See Answer
Answer is Junu
How?
Jd’s father is keeping the names by changing the second alphabet by vowels, so from a,e,i,o,u, its u’s turn now 🙂
See AnswerHide Answer
How?
Jd’s father is keeping the names by changing the second alphabet by vowels, so from a,e,i,o,u, its u’s turn now 🙂
Magento by default has states only for few selected countries and you might want to include your country’s states in your site for various purpose, to give a select option in state on checkout page, to configure some rules etc.
There is no direct UI available as of now but otherwise also it is quite simple to upload this information using a CSV file and phpmyadmin. you need two to create two csv files
Step 1: directory_country_region.csv => this should include four colums region_id, country_id(in ISO-2), region code, region name.
region_id is nothing but auto incrmented id directory_country_region table, so fill this column with incremented numbers(greater then current auto_increment number)
country_id > ISO-2 code, ex. US, UK, IN
region_code => You can fill iso-2 codes for states(find it using google)
region_name => default name for the state
Step 2: directory_country_regions_name.csv => this should include 3 columns locale, region_id and region_name
locale => ex. en_us etc.
take region_id from previous file and change the default name to the locale.
It is not compulsory to fill this table, you can skip it, unless you want to support multiple locale.
I have created sample files for Indian states, directory_country_region_IN.csv and directory_country_regions_name_IN.csv
[Read more…]
See AnswerHide Answer
See AnswerHide Answer
Answer is 97.
How?
11 => (1+1)(1-1) => 20
12 => (2+1)(2-1) => 31
13 => (3+1)(3-1) => 42
14 => (4+1)(4-1) => 53
similarly
18 => (8+1)(8-1) => 97
Guess the song from the symbols in the image below:-
See AnswerHide SongFeels like listening it ?
How?
Lets assume smallest square side length is 0.5 cms, then
Number of squares with side 0.5 cms: 30
Number of squares with side 1 cms: 16+11
Number of squares with side 1.5 cms: 2 + 3 + 2
Number of squares with side 2 cms: 9 + 1
Number of squares with side 2.5 cms: 0
Number of squares with side 3 cms: 4
Number of squares with side 3.5 cms: 0
Number of squares with side 4 cms: 1
————————————
Thus total number of squares are: 79
From 2011 facebook is organizing a Facebook hacker cup every year around feb, visit Facebook hacker cup homepage for more details
This question is the third question(Carried 45 marks out of 100) for the Round 2 of 2013 hacker cup. only top 100 contestants will be moved to Round 3.
In this problem you need to count number of possible permutations p of the first N integers, given N-1 constraints of the form pi < pj.
The first line contains an integer T, T ≤ 20, followed by T test cases. Each test case begins with an integer N, N ≤ 1000, which is the number of integers in the permutation. The next N – 1 lines each contain a single constraint in the following format: “i sign j“, where 0 ≤ i, j ≤ N – 1 and sign is either “<” or “>“, which denotes whether the i-th element of the permutation should be less than or greater than the j-th element.
It is guaranteed that it is not possible to partition indices into two disjoint sets A and B such that there is no constraint involving elements from both A and B.
[Read more…]
From 2011 facebook is organizing a Facebook hacker cup every year around feb, visit Facebook hacker cup homepage for more details
This question is the second question(Carried 35 marks out of 100) for the Round 2 of 2013 hacker cup. only top 100 contestants will be moved to Round 3.
In the not so distant future the world is populated by robots and ruled by an evil robot emperor. Every robot in the world can be identified by a unique numeric ID, and the list of all the existing robot IDs is easily accessible to everyone. One day the emperor decided to call for a general election to preserve an illusion of democracy. He set it up in the following way:
All the robots are perfectly logical but also rather lazy and prone to procrastination. That’s why after figuring out the plan of the emperor, they will abstain from voting unless they have to vote to survive the election (including this round and all later rounds). If they will die whether or not they vote, they will vote in the hope that the emperor will spare them. (He won’t, because he’s evil!).
Given N – the initial population size, K – the number of robots disassembled after an unsuccessful vote and P – the required percentage of votes.
Compute the number of times the vote will take place.
[Read more…]
From 2011 facebook is organizing a Facebook hacker cup every year around feb, visit Facebook hacker cup homepage for more details
This question is the first question(Carried 20 marks out of 100) for the Round 2 of 2013 hacker cup.
“Happy birthday to you… Happy birthday to you… Happy birthday to Grovyle… Happy birthday to you…”
Today is Grovyle’s birthday and he is going to invite his friends to his birthday party. To have an awesome party, each of the attendants should get one piece of cake. Your job is to help Grovyle invite as many friends as you can.
However, Grovyle’s parents are very mean, and make him use the following rules when cutting his cake:
From 2011 facebook is organizing a Facebook hacker cup every year around feb, visit Facebook hacker cup homepage for more details
This question is the third question(Carried 45 marks out of 100) for the Round 1 of 2013 hacker cup. only top 500 contestants will be moved to Round 2.
John’s friend Peter purchases a new high resolution monitor with dimension W * H where W is the number of pixels in each row (i.e. width) and H is the number of pixels in each column (i.e. height).
However, there are N dead pixels on the monitor. The i-th dead pixel is located at (x[i], y[i]). (0, 0) is the top-left pixel and (W – 1, H – 1) is the bottom-right pixel. The locations of the dead pixels could be generated by 6 given integers X, Y, a, b, c and d by the following rules. If 2 pixels are at the same location, they are considered the same. It is possible that there are less than N distinct dead pixels.
Peter connects his monitor to his computer and opens an image with dimension P (width) * Q (height). How many unique positions can the image be placed so that it can be displayed perfectly (i.e. all pixels of the picture are shown on the monitor)? The image cannot be rotated.
[Read more…]