[gcj] Contest analysis for GCJ 2015 Qualification Round

2015-04-13 Thread 'Topraj Gurung' via Google Code Jam
Hi all,

The contest analysis for GCJ 2015 Qualification Round is available at:
https://code.google.com/codejam/contest/6224486/dashboard#s=a

Thanks,
Topraj, for the Code Jam team

-- 
You received this message because you are subscribed to the Google Groups 
Google Code Jam group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAJq1B7koRYB0uqNLiwNgXMh2dugxUvbi%3DTvhAueL%2B_aUpnk2-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[gcj] Re: Python Fast Enough For CodeJam?

2015-04-13 Thread Eibe
Am Montag, 13. April 2015 15:12:38 UTC+2 schrieb Mustafa Hussain:
 Hi,
 
 I used Python to get through the qualification round and it is the langauge 
 I'm most comfortable with. However, I was looking at 2014 codejam results and 
 see people who used Python eventually switched to C++/Java/D as the 
 competition went along. Is this something I should consider? Round 1A is in 
 5 days but if I start now I think I can get comfortable with the basics of 
 C++ (I have used it a bit in the past) till then.

Python is fast enough. But you may miss some data structures build into other 
languages. For example: 
A binary search tree allowing log n find/erase/insert of some element in the 
tree. Useful for example in 2013 round 1A Problem B.

-- 
You received this message because you are subscribed to the Google Groups 
Google Code Jam group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/573ad5c0-d31a-40ac-9825-9559896617d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gcj] Maybe I am paranoid, but I think solution for C Dijkstra for qualification round is wrong?!?

2015-04-13 Thread vthai
On Tuesday, April 14, 2015 at 10:16:16 AM UTC+10, Felix Halim wrote:
 Hi vthai,
 
 
 The multiplication in quaternions are not commutative -- that is, there are 
 some a and b for which a * b != b * a.
 
 
 When you create all possible reduction for 'k', you must multiply it 
 carefully (pay attention to the left and right operand).
 
 
 
 What's your output for this input:
 
 
 1
 2 2
 ij
 
 
 
 The correct answer is YES
 
 
 Felix Halim
 
 
 
 
 On Mon, Apr 13, 2015 at 3:26 PM, vthai veng...@gmail.com wrote:
 I might be illusion or paranoid but I think my solution is correct but 
 somehow google just mark it as wrong.
 
 
 
 As I understand the sub problem C - Dijkstra ask us to identify if for a 
 given string of combination i,j,k there exist any substring that can be 
 reduced to i , j, k in the exact order.
 
 
 
 So my solution is first to identify all the possible 'i' reduction and 'k' 
 reduction in the whole string at the same time(look for 'i' reduction from 
 left, 'k' from right and put into a hashmap) Next for each 'i' found, start 
 from the very next index and search for 'j' reduction, if one is found check 
 whether the next index for 'k' exist in the hashmap of found 'k' reduction.
 
 
 
 But I get an incorrect answer whenever I submit, which I have go over many 
 times and still don't understand.
 
 
 
 I download the solution from the top scorer and sees the following different 
 in answers (attached).
 
 
 
 The difference is some of my answer indicates that there is a reduction for 
 i,j,k for the given string while the correct answer says NO. (so it is 
 either I identify the wrong answer, or the solution misses some case)
 
 
 
 
 
 I would like to show one example here:
 
 
 
 Case #14:
 
 
 
 this case should be a YES(I ran the correct solution and it gives a NO) as I 
 can tell(or maybe I am wrong?!?)
 
 see the input below, it can be divided into the following portion
 
 
 
 from 0 -- 14 (reduce to i)
 
 from 15 -- 18 (reduce to j)
 
 from 19 -- end of string (reduce to k)
 
 
 
 the input is:
 
 
 
 1 1
 
 

Re: [gcj] Maybe I am paranoid, but I think solution for C Dijkstra for qualification round is wrong?!?

2015-04-13 Thread Angel Java Lopez
I'm not sure about your example

But another approach is:

- Check if the full string resolves to -1, as ijk = -1
- Then, find the first/shortest i from left
- Then, find the first/shortest k from right

Angel Java Lopez
@ajlopez


On Mon, Apr 13, 2015 at 7:26 PM, vthai veng.t...@gmail.com wrote:

 I might be illusion or paranoid but I think my solution is correct but
 somehow google just mark it as wrong.

 As I understand the sub problem C - Dijkstra ask us to identify if for a
 given string of combination i,j,k there exist any substring that can be
 reduced to i , j, k in the exact order.

 So my solution is first to identify all the possible 'i' reduction and 'k'
 reduction in the whole string at the same time(look for 'i' reduction from
 left, 'k' from right and put into a hashmap) Next for each 'i' found, start
 from the very next index and search for 'j' reduction, if one is found
 check whether the next index for 'k' exist in the hashmap of found 'k'
 reduction.

 But I get an incorrect answer whenever I submit, which I have go over many
 times and still don't understand.

 I download the solution from the top scorer and sees the following
 different in answers (attached).

 The difference is some of my answer indicates that there is a reduction
 for i,j,k for the given string while the correct answer says NO. (so it
 is either I identify the wrong answer, or the solution misses some case)


 I would like to show one example here:

 Case #14:

 this case should be a YES(I ran the correct solution and it gives a NO) as
 I can tell(or maybe I am wrong?!?)
 see the input below, it can be divided into the following portion

 from 0 -- 14 (reduce to i)
 from 15 -- 18 (reduce to j)
 from 19 -- end of string (reduce to k)

 the input is:

 1 1

 

Re: [gcj] Please help me with the Small B. Getting wrong.

2015-04-13 Thread Nate Bauernfeind
My approach doesn't put the pancakes on a new plate, but rather increased the 
number of people eating off that plate. Then you never need to calculate how 
many pancakes to put where. Division and modulo was all I then needed to figure 
out how many minutes were needed to eat the pancakes originating from that 
plate.

I implemented a binary search, answering, can we eat all pancakes in n minutes? 
Whenever a plate was too large, I'd add an eater and use a minute.

-- 
You received this message because you are subscribed to the Google Groups 
Google Code Jam group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/e9c8e14a-732f-4b90-8005-95fbbfa50c16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gcj] Please help me with the Small B. Getting wrong.

2015-04-13 Thread Xiongqi ZHANG
Are you sure binary search will work?

I am very interested in the way you use it. Please give details/code.

Parker

On Mon, Apr 13, 2015 at 7:37 PM Nate Bauernfeind nate.bauernfe...@gmail.com
wrote:

 My approach doesn't put the pancakes on a new plate, but rather increased
 the number of people eating off that plate. Then you never need to
 calculate how many pancakes to put where. Division and modulo was all I
 then needed to figure out how many minutes were needed to eat the pancakes
 originating from that plate.

 I implemented a binary search, answering, can we eat all pancakes in n
 minutes? Whenever a plate was too large, I'd add an eater and use a minute.

 --
 You received this message because you are subscribed to the Google Groups
 Google Code Jam group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-code+unsubscr...@googlegroups.com.
 To post to this group, send email to google-code@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/google-code/e9c8e14a-732f-4b90-8005-95fbbfa50c16%40googlegroups.com
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Google Code Jam group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAGDEU-KMmFivebe9oMPy7nTTH91tM-d%3DP6YEk4NYW2%3DDUQkBVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[gcj] HackerEarth's Awesome April Contest

2015-04-13 Thread Vaibhav Tulsyan
Hey guys,

Amidst your preparation for Google Code Jam, please do participate in a
2-hour long programming contest - Awesome April
https://www.hackerearth.com/awesome-april-15/ - being held by HackerEarth
http://hackerearth.com. Top 3 participants will get cash prizes and
participants having maximum score will get cool HackerEarth T-Shirts!

Contest begins at: 25 Apr 2015, 09:30 PM IST

-- 
Regards,
Vaibhav Tulsyan.

-- 
You received this message because you are subscribed to the Google Groups 
Google Code Jam group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAHzezBxLmWw4U4dEKvMc770iQBmjN2%3DZhHTU-xQystvV%3D1OP8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[gcj] Re: Python Fast Enough For CodeJam?

2015-04-13 Thread Stanislav Zholnin
I don't think people switched, it's just Python users were outcompeted by 
c++/java users. Because on average c++/java competitors are more trained. 
Reason is - most of online judges favor Java and C++ and if you want to train 
and get better in competitive programming you eventually have to switch to get 
access to more training problems.

As for Python - in my experience it is absolutely OK for Google Codejam. I 
solved almost all problems from previous years in Python and there were 
literally 1 or 2 where I struggled with time limit. In both cases switching to 
PyPy solved the problem. I do recommend PyPy because of that.

понедельник, 13 апреля 2015 г., 8:12:38 UTC-5 пользователь Mustafa Hussain 
написал:
 Hi,
 
 I used Python to get through the qualification round and it is the langauge 
 I'm most comfortable with. However, I was looking at 2014 codejam results and 
 see people who used Python eventually switched to C++/Java/D as the 
 competition went along. Is this something I should consider? Round 1A is in 
 5 days but if I start now I think I can get comfortable with the basics of 
 C++ (I have used it a bit in the past) till then.

-- 
You received this message because you are subscribed to the Google Groups 
Google Code Jam group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/085b51df-899a-46ed-a520-0d18f264b662%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gcj] Re: Correlation of solution with algorithmic methods

2015-04-13 Thread Stanislav Zholnin
Best problems are the ones where you can't directly attribute it to one method 
- when it is a mix of several methods or some funny way of reapproaching known 
problem from unusual angle.

This is because plain vanilla problems are already very boring to people who do 
competitive programming for long time.

GCJ team usually very good coming up with unusual problems - often even 
knowledge of hardcore data structures or algorithms is not needed, just 
thinking hard and putting your brain at work.



воскресенье, 12 апреля 2015 г., 11:08:06 UTC-5 пользователь vivek pandya 
написал:
 Hello ,
 
 I have first time participated in gcj and I was just able to solve first 
 problem.
 
 I am very new to competitive programing. Generally I try to correlate 
 solution for program to some formal method of problem solving like brute 
 force ,divide and conquer , dynamic programing.
 
 Is it always possible to shape our solution to above mentioned methods ?

-- 
You received this message because you are subscribed to the Google Groups 
Google Code Jam group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/019aaf49-ea37-4f2f-a54d-d5ae9fae04b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gcj] codejam2015

2015-04-13 Thread aurimas neverauskas
On Sunday, April 12, 2015 at 5:08:06 PM UTC+1, Shubham Jain wrote:
 Is there any reason for choosing (12+M%12) particularly?

It can be reduced to min(M, 4 + M %4), as 4 parts multiplied is Identity = 1.

Then create new string repeated that times and check it.

Find first i value, then first j after it, and check if last part equals to k.

Usually good simplified string looks like this 11ijk - 
multiplying by 1 doesn't change value.

-- 
You received this message because you are subscribed to the Google Groups 
Google Code Jam group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/baaa10b7-d0bb-43d9-9405-6d6476196598%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.