Announcement for IOPC 2017

Hello all,

Techkriti 2017 presents International Open Programing Contest (IOPC) with huge prize money of INR1,20,000 at stake. We have tried to make the contest utilize the best of your time. This is an individual contest of 3 hrs to start on 21 April 2017. The contest will be rated. Contest page :

Hoping for a huge response from everyone. The best may prevail over.

Software Corner
Techkriti 2017


Thanks. This will be my first contest. What will be the level of questions?

1 Like

Contest is on coming 21st April and prizes are not declared yet. Why so?

But techkriti was in march.

Okay . Very exciting it seems but reveal the prize scenario ; i mean , upto which rank what are the prizes . Thanks .


thanks for organising it .

The contest announcement says “Techkranti” instead of “Techkriti” :stuck_out_tongue:

Techkranti - IOPC 2017

1 Like

May be a typo!

I am participating in the competition right now. each submission is taking at least 5 minutes to give a verdict. Really frustrating! Sad to see this happening in a rated round :frowning:

1 Like

Submissions in python are taking over 10 mins. Agree with @tanmay_garg95. Really frustrating.

1 Like

Someone upvote me …

1 Like

I really loved problem D - “Christmas Time” … first read and immediately start to work on it; until I see that other two problems have been solved very fast… so one stop, problems solved, and again almost two and half hours stucked with problem D (I know, I know, this is a very common mistake in programming competitions: read all the problems, and never, I mean never fall in love with only one — this is a good advice for newbies)… I´m frustrated because I was not able to find some enough fast solution to solve the problem at the end.

Would be some editorial for this problems? I´m wondering if there is any kind of dynamic solution which run notable faster than N^2 for problem D… Looking on internet we can find a lot of Math´s conjectures and formulations about “partitions of integer numbers”, which at any point you could use to solve one part of the problem due it´s equivalent to find the number of ways to distribute N gifts. But I can´t find any formula which works properly although they find numbers which are very close to correct answers; it´s seems that kind of math´s are not a good idea for this problem :slight_smile:

Now I reviewed all problems and apart of this, it was a good contest with nice tasks.
Thanks beforehand for any answer.


Exactly what I recommend people. Take out 15 min and read all problem before attempting.

Yes, it was really frustrating. Submit a solution, get result after 15min that its a TLE. At the first instance, I was like "Wait…is the judge WAITING for my program to finish? (and since time increases exponentially, what about algos requiring 10^6 seconds? :stuck_out_tongue: )

@mathecodician Can you share your approach for problem Birthday and tears?

1 Like

Just trying one point of this good article “Teamwork in Programming Contests: 3 * 1 = 4 :” … not trying teamwork obviously, it was more about solving some harder problems firstly and then the easy ones, considering 3 hours of contest at the end you are more tired to try harder problems.

The problems were nice . Tried applying some maths with dp for “Christmas Time” but my observations didn’t quite match the cases i looked out for …
anybody come with the right approach to this problem . P.S. :- sort of editorial will be appreciated

Is not a hard problem… for sure it was the second easy one… some idea:

1 - Read the numbers, store them in some array.

2 - Linearly compute for each position how many numbers starting on it are equals (and consecutive), not matter if you do that to the right or to the left.

3 - Use a recursive solution for cutting the original string and so on, and keeping always with the minimum amount needed.


//Initialize some variable “best” with a huge number. Note that “last” is an array and it store for each position, the position of last element to the right which is equal to it; they form a consecutive row of equal values…

Call a Recursive Function: COMPUTE(1,large_of_string,0)

void COMPUTE(int ini, int fin, int c)

if(c >= best) return;

if(last[ini] >= fin) best = c;

if(0 == (fin - ini + 1) % 2) //Even length…


COMPUTE(ini + (fin - ini + 1)/2, fin, c+1);

COMPUTE(ini, fin - (fin - ini + 1)/2, c+1);



1 Like

I didn’t use recursion.I first checked whether the given string is the type of string chef likes.If it’s of that type print 0.I then checked parity of the length of the given string if it’s odd print -1.Then even length strings comes into consideration.Here we have 2 cases.If given string is power of 2.If it is then I started with temp= n checked whether it can be the answer or not.Then temp=n/2,n/4…Down to 2.Final ans if log2(n) - log2(temp).If it’s not power of 2 then here we have only one case.If after tearing the middle part(we get two strings),just checked if any of them is ans.