SAVY's blog

By SAVY, 9 years ago, In English

Hi,

Technex '15 (IIT BHU) presents you,

MATHLETICS

A 3hr online MATHEMATICAL PUZZLE solving contest, under the flagship of Byte the Bits, Technex '15 (IIT BHU).
A sound knowledge of mathematics together with computational thinking will be essential to solve problems.

Come join us to prove your mathematical skills and win prizes worth INR 70,000.

7 QUESTIONS 3 HOURS, COME JOIN THE BATTLEGROUND AND PROVE YOUR METTLE, WHILE FIGHTING AGAINST SOME OF THE SHARPEST BRAINS.

Event partner: hackerrank.com
Event Date: 25 th Feb(9PM-12AM IST)
Contest Link: https://www.hackerrank.com/mathletics
Register on the link given below. Click Here

Technex '15 invites you to participate in this event. We have prepared a nice problem set to lure you. Do participate and HAPPY CODING!!

EDIT 1 : Just to clarify, international participants are also eligible for prizes. They may ignore registration on technex.in.
EDIT 2 : Contest is over.
Contest stats:
No of participants: 434
No of participants with atleast 1 solution : 267
No. of submissions : 2570
Problem with least accuracy(Max difficulty) : "The Array Challenge(Easy)"
No. of contestants who solved it : 14

Winners :
1) uwi
2) hash_include
3) xorfire

EDIT 3 : Thank you for participating. We hope you enjoyed the contest. Do join us for PRAYAAS-The 5hr algorithmic coding contest, on 28th Feb(2PM-7PM IST), @codechef. LINK : http://www.codechef.com/PRYS2015/

  • Vote: I like it
  • +50
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Registration form at techex.in keeps telling me to "Enter valid phone no.", so I suppose only Indian participants are eligible for prizes, is it true?

»
9 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Gentle Reminder, contest starts in less than 30 minutes.

»
9 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Easy contest, except for the Monkey and Bananas problem, for which I racked my brains for half an hour and then googled it to find that it is in fact a famous problem. I am surprised so many people know about this puzzle and I had never heard of it (probably because I have never prepared for any programming interviews)

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Guys, How did you solve "The Array Challenge(Easy)" and "Summing The AGP" hard parts?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    For AGP hard, the initial problem statement had a typo, they wrote 10e18 whereas they meant 1e18, they fixed it later on. You just have to get the formula from Wikipedia and implement it, check out my reply to mmaxio's comment for my code.

  • »
    »
    9 years ago, # ^ |
    Rev. 16   Vote: I like it +5 Vote: I do not like it

    For "Summing the AGP" you need to calculate (1 + r + r2 + ... + rN) and (0 + r + 2r2 + ... + NrN).
    I assume that you know closed formulas for these operations (and why these calculations are necessary), which require division. In 'easy' part modulo is prime, so we can perform division by multiplying.

    As for the hard part: notice, that we can express those calculations in matrix form:

    ,

    where si = (0 + r + 2r2 + ... + iri)

    Therefore, you can calculate sum of iri using matrix multiplication by raising that matrix to (N + 1)'th power. Similar approach for calculating sum of ri.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +13 Vote: I do not like it

    For Array Challenge, observe that f(A1, A2) is always n2 and so, it just comes down to finding the number of possible A1, which is easily seen to be .

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone share their code for "Summing The AGP"?