Hi, Codeforces Community!
Codefest'17 — a diverse roster of high-quality programming competitions by Department of Computer Science and Engineering, IIT Varanasi is excited to present Perplexed — the constrained programming event.
The contest will take place at HackerRank (https://www.hackerrank.com/perplexed-codefest17 ). This contest will be an individual event with a duration of 5 hours, from Sep/22/2017 15:30 UTC. With the creativity that the problems will naturally encourage and INR 50,000 at stake, there is absolutely no reason for a programmer to not give this one a shot!
The questions here will bend your mind in different ways — this is not your normal coding contest! After all, tackling various kinds of situations and challenging constraints is what makes programming an art :)
Prizes -
1st (Overall) — INR 20,000
2nd (Overall) — INR 12,000
3rd (Overall) — INR 8,000
1st (India) — INR 7,000
1st (IIT Varanasi) — INR 3,000
To be eligible for the prizes you must be registered for the Perplexed event on http://codefest.tech/dashboard/events/. Innovate or stay perplexed!
UPD1 — Contest will start in 2 hours. It will have 12 problems to be solved in 5 hours.
UPD2 — Contest has started.
UPD3 — Contest has ended.
Overall Winners —
Indian Winner — sp_502
IIT(Varanasi) Winner — ab13123002
Thank you for participation and hope to see you in other Codefest'17 events.
Auto comment: topic has been updated by divyam (previous revision, new revision, compare).
Auto comment: topic has been updated by divyam (previous revision, new revision, compare).
How many tasks?
There will be 10-12 problems.
Why doesn't it appear on the contests page on HR?
It will soon be available in the college contests section of Hackerrank.
Holy shit! Been using HR for more than a year and did not know it had a 'college contest' section :P
You can have a look at last year's contest to know more about the type of problems.
Auto comment: topic has been updated by divyam (previous revision, new revision, compare).
What do you mean by constrained programming?
Auto comment: topic has been updated by divyam (previous revision, new revision, compare).
Auto comment: topic has been updated by divyam (previous revision, new revision, compare).
how to run the executables in linux?
Linux users should use .out file.
In command line —
chmod u+x filename
./filename
Any idea why this TLEs?
I suppose
!!
works in linear time (Haskell lists have no random access).In lying detective problem, for this test case,
4
a b c
aacb
The answer I am getting is 3(aacb(0, 2, 3), acb(0, 2, 3), acb(1, 2, 3)). But the actual answer is 4. Can any one tell me the other subsequence?
Substring aacb = 3(aacb(0, 2, 3), acb(0, 2, 3), acb(1, 2, 3))
Substring acb = 1(acb(0,1,2)
You have to find the answer for each substring and sum up the values.
Oh, Thanks. I misread the question!
Auto comment: topic has been updated by divyam (previous revision, new revision, compare).
How do you solve The Six Thatchers?
Requires an approximate algorithm.
Choose any two indices randomly and select all numbers from 1 to 10^5 which give the same remainder for these indices. Check whether any of these (p,m) pair form the answer. If you iterate the above process 10 times, the probability of not getting the correct answer is about 10^(-30).
Thus, the solution works because k/n is less than equal to 0.02.
How do you derive this? The concept seems similar to 844D - Interactive LowerBound but a derivation would help me understand better.
As k/n <= (1/50), The probability that you will select at least one number from the removed set in one iteration is approximately (1/25) . So in 10 iterations it becomes very less .
This code shows correct answer on local machine and doesn't look like having any undefined behavior. Can anyone check?
Just in case anyone's still wondering, the code
changed to
on online judge and became a nested if statement, which became the reason for wrong answer.
Can you please explain a little more? Why would the online judge discard the macro? I am not good in the C++
Because of this:
On online judge, the
#ifdef PRINTERS
condition fails so tr(a) is substituted with a space.