Comments

I was part of organising similar events in previous years, generally sending prizes requires approval from college professors and they denied to approve the transactions for overseas participants since it was "costing too much". Too much pain to convince them for anything. Later on we did send amazon gift cards to overseas winners but couldn't get approval for some prizes :(

0

What was the intended solution for D? I had a solution of $$$O(T * \sqrt d)$$$ but it TLed.

Edit: Ahh, intended was $$$\log d$$$ per test.

Link: 180645422

Great problems. (Specially D) How to solve D? Did anyone get AC using randomized algorithms, it would be great if someone could share some insights.

Ohh, slipped through my mind that shorts are of 2 bytes. Thank you.

Why couldn't the memory limit for E be 512 MB? I think my solution would have passed 163297562. I didn't have the time to make optimizations :(

Still thanks for the round.

How to solve problem D? (Find the number of pairs $$$A$$$, $$$B$$$ ($$$A \lt B$$$) such that $$$lcm(a, a + 1, .. b - 1, b) = x$$$

I tried to handle cases up to length 5 $$$(B - A \lt = 4)$$$ and then brute force for bigger lengths.

I suspect it can be solved using simplex.

Edit: After some minor changes and printing errors simplex ACed.

Code: Link

Actually by $$$O(n^4)$$$ I was referring to the time complexity. Is there any efficient way to iterate over all pairs of such lines that share a common midpoint?

I had a different solution, in which I was calculating all lines possible which will be $$$O(n^2)$$$, and then for the lines with a given slope and length, I sorted them and took two extreme pairs of such lines so that the distance between them is maximum. I thought this was the intended solution.

Isn't this $$$O(n^4)$$$ ? Since there can be $$$O(n^2)$$$ such diagonals sharing the same midpoint and you are iterating on them.

I think Divide & Conquer DP might work were. My idea is let's say we have to solve for an interval $$$[0, n - 1]$$$ where $$$ 0 \lt = l \lt r \lt = n - 1 $$$ now we take $$$mid = {(l + r) / 2} $$$ and solve the same problem for $$$[0, mid]$$$ and $$$[mid + 1, r]$$$. Now we only need to add the number of ways in which $$$l \lt = mid$$$ and $$$r \gt mid $$$. We can do this by creating suffix knapsack for $$$[0, mid]$$$ and a prefix knapsack for $$$[mid + 1, r]$$$. We can evaluate number of such ways in $$$O(sumRange)$$$ and $$$O(n * sumRange)$$$ for knapsack. This will be done at most $$$log(n)$$$ times.

The time complexity will be: $$$O(n * sumRange * log(n))$$$

Is there any way to use some whiteboard or its equivalent?

LoL, I waited for 1 hr+ and no breakout room was assigned. And just a few hours before mock they have sent some shitty rule-book with so many requirements. Poor management.

+3

I tried but it was still slow. I stress-tested on max constraints it took about 1 minute to execute on my PC.

Code: 126014845

+25

I thought constraints to be different for C, so I solved it for $$$T \lt = 10^5$$$.

Solution

Is it possible to have contest format similar to the preliminary round i.e. duration of the contest is 2.5 hrs.

+15
+14
+11
+32

There will be a separate ranklist for Div1 participants.

+50

Yeah, It's hard to create problems challenging enough for top div1 participants.

Nevertheless prizes are open for all :)

Actually it can be due to architecture, operations on doubles in C++17(64 bit) are more precise than doubles in C++14. I used doubles cause I was getting TLE and thought that could speed things up.

I submitted the same code in C++14 with long doubles and it worked as expected.

Code

Woaaah, I did the same and got AC, I failed to realise IO was the bottleneck.

Thanks a lot :)

Someone getting an AC on G. Hobbits with Doubles and Binary Search?

I am getting TLE, expected time complexity $$$O(n * log(max(A_i)))$$$. Are doubles really that slow or was this intended not to pass?

Maybe the contest could have been extended by 10 mins due to long queue :(

On hmehtaSingle Round Match 795, 6 years ago
0

How to solve DIV1 300. My idea was Dynamic Programming, use $$$dp[u][v][len]$$$ to store path from $$$u$$$ to $$$v$$$ of length $$$len$$$. After building this table, I made deductions, the path will be a straight line to some node $$$next$$$ and then loop around a cycle of length say $$$l$$$ and then move to final node. I handled the case where $$$next$$$ is my initial node. However, complexity of my solution was $$$N^5$$$, which I suppose isn't good enough.

+8

For the rated contest except the ones you mentioned, Cook off, Lunchtime and Long they mention along with the contest name. For eg {name}(Rated for all/Div2) . And yes not all contests that have prizes are legit but they have a decent probability of being good. Club with a reliable organisation and it becomes more reliable, like many organisations conduct some sort of annual coding contests and for such contests there is a codeforces blog for the same.

+8

With my experience you can identify if the contest is rated or not. Rated contest are more legit as compared to non-rated ones. Plus there are many college contests as well, I generally go by the prizes as that kind of ensures that organizing team has put some efforts in the preparation.

Can someone hack my solution for D, the time complexity of my solution is $$$O(n^3)$$$.

Link: https://codeforces.me/contest/1400/submission/90999462

Edit: It's $$$O(n^3)$$$

How to solve Medium 500, I was able to make precomputations for N <= 100 but was unable to relate it with bigger dimensions. Borders, in my case.

"6 Problems" well that's something new, I guess.

Any Intuition behind this, cause I thought it was trivial to solve for a number which is prime for 6 out of 7 possible cycles. And then print the number in such a way so that the 7th cycle is non-prime.

+5

Adding a music bot on the server pairs well :D

Link: Octave

+3

I think the time limit for Div1 B could have been relaxed to 3/4s as the modulo operation is slow. Many solutions failed even if they had the desired asymptotic complexity.

I know E was mathematical but still, inmho contest would have been better if E and D swapped positions. Many people use m2.codeforces during the contest, hence don't see standings sometimes.

Reminder: Contest starts in 30 mins from now.

All the best.

Reminder: Contest starts in 20 mins from now. This thread can be used for post-contest discussions, the crux of the contest would be to write shortcode rather than solving problems :).

Hope you all enjoy the event.

All the best.

It would have been great if you could tell why submissions were giving NZEC, was really stuck up with that for 150 mins.

Yeah -_-

Reminder: Contest starts in 20 mins from now, this thread can be used for post-contest discussion. All the best.

I was just asking btw, and I have given a contest in which I received laddus but it wasn't mentioned in the prize. These days they generally distribute laddus for almost every public contest. Edit: Even when our college organized a public contest on CodeChef they gave laddus and anyways the organizers can always ask for more rewards so consider it as a humble suggestion.

Since the contest is public I assume Codechef must be giving laddus to the winners (Top 3), are they?

Reminder : Contest starts in 5 hrs from now.

+6

Is it just me or are the topcoder servers really slow the arena window is loading since eternity :( .

+2

Nice Contest guys! Did the problem "A Not-so-easy Task" had a greedy solution cause my idea was that sum of all previous terms won't exceed the current one leading to a greedy approach. Unfortunately ran out of time :(

On AkiLotusCodeforces Round #614, 7 years ago
+30

After knowing there might be an interactive problem ...

Done problems have been moved to practice section.

On SureYeaahByterace 2k19, 7 years ago
+21

I will ping the winners so that we can discuss about cash transactions.

On SureYeaahByterace 2k19, 7 years ago
+21

Update

Contest starts in an hour. This thread can be used for post contest discussions.

All the best for the contest.

On SureYeaahByterace 2k19, 7 years ago
+27

For cash prizes it is global i.e literally anyone and for HackerEarth T-Shirt winner must be Indian resident.

On SureYeaahByterace 2k19, 7 years ago
+21

Reminder Contest will start in 6 hours from now.

Well I just shared the method which worked for them and for this test case their solution works fine I guess, 19,12 and then remove 20.

We didn't solve the SumOr problem but a team from my institute ranked 17 solved that problem by reversing it i.e they reconstructed the solution from the end in last you will try to have the largest number and then continue adding elements until the total OR reaches that of the whole array. Elements will be added in such a way so that the value gained by order is maximum. After we reach a point where the number we have, total OR equal to that of the array we can add rest of the number in any order. Reverse the process and print it you will get the answer. We tried doing same for bits got WA didn't get much time for correction.

How to Solve D??

That must be the official problems solved I have solved more than 200 problems. I had started with a2oj ladders in the beginning, now I usually read topics from emaxx (cp algorithms). How do you practice new topics ss_loves_AC.

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

.

Thank You.

Is there any possible test case that would fail for double as well?

It was a great contest, can someone provide some insights on how to solve "Some Impact".