ajs97's blog

By ajs97, history, 7 years ago, In English

Techkriti 2017 and samsung research India brings forward International Online Programing Contest (IOPC) with a chance to grab your pile from INR 1,20,000. This is a rated contest of 3 hrs and will start at 15:00 IST on the 21st of April,2017. There is a little under 12 hours left till the contest starts.
The contest is hosted on codechef.

Contest page : https://www.codechef.com/IOPC2017.

Note that the contest is an individual rated contest on Codechef.

The problem setters are utkarshl, kaushal02 and dwivedi with triveni and Dopahkiin as testers.

The prize distribution is as follows:
1.The international first,second and third get 20%,17% and 13% of total money respectively.
2.The 4th and 5th positions (international) get 10% & 8% respectively. positions 6-10 get 1.6% each.
3.The first, second and third in India get 10,8 and 6 percentage of total
4. In case if someone is eligible for more than 1 prize, he gets the larger one only.

Hoping for a huge response from everyone. May the Force be with you!

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

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

Auto comment: topic has been updated by ajs97 (previous revision, new revision, compare).

»
7 years ago, # |
  Vote: I like it +126 Vote: I do not like it

We have not received the prize money from IOPC 2015.

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

The codechef contest drop down list says Techkranti — IOPC 2017. xD

»
7 years ago, # |
Rev. 2   Vote: I like it -35 Vote: I do not like it

Where does this fail for this problem ? I just simulated everything using segment tree.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    segment tree is not required.Its just basic recursion. Its a variant of standard version of Josephus problem.

    Code
  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    get_ac function takes int k, while it overflows in main — various similar mistakes like this. I just simulated everything using BIT and it worked fine.

»
7 years ago, # |
  Vote: I like it +5 Vote: I do not like it

How to solve Christmas Time?

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

Can someone please explain the approach for https://www.codechef.com/problems/IOPC17G/

  • »
    »
    7 years ago, # ^ |
    Rev. 4   Vote: I like it +3 Vote: I do not like it

    See this code — https://www.codechef.com/viewsolution/13376017

    If the intervals intersect, it is the right end point of the interval that ends first. Else, let [a,b] be the first interval and [l,r] the second with b<r. Consider the naive solution of checking every number from b to 1 in decreasing order. What is the condition for a given x? It is that a multiple of x lies both in [a,b] and [l,r] => (a-1)/x<b/x and (l-1)/x<r/x. Now, consider x' such that x' = x-1 and b/x = b/x' and r/x = r/x' then (a-1)/x'>=(a-1)/x, so there is no need to check x'. So from a given x we need to check only next smaller number x' such that b/x' or r/x' is different. This is a major optimization since there are only O(sqrt(r)) different r/x. So, from a given x next x' = max(r/(r/x+1),b/(b/x+1)). Complexity = O(sqrt(r)) for a test case.