Arpa's blog

By Arpa, history, 6 hours ago, In English

Hey there!

Thank you for being part of the ICPC India Prelims 2024! 🚀

I've put together hints and solutions for the problems to help you reflect on the challenges. As the contest admin, I even recorded myself solving the problems live — it's a mix of strategy, insights, and a behind-the-scenes look at my thought process.

🎥 Watch the video here: https://youtu.be/NsIj7CgDPY8

Let me know what you think, and feel free to share your thoughts or questions! 😊

The problems are ordered from easy to hard.

Unsatisfying Array

Hint
Solution

AND Quest

Hint
Solution

Small Indices

Hint
Solution

Yet Another GCD Problem

Hint
Solution

Equations

Hint
Solution
  • Vote: I like it
  • +12
  • Vote: I do not like it

»
6 hours ago, # |
  Vote: I like it +20 Vote: I do not like it

Thanks for the fast editorial.

Spoiler
»
6 hours ago, # |
  Vote: I like it +23 Vote: I do not like it

Why was there a test case with K=0 in problem Yet Another GCD Problem? The constraint mentioned in the problem states that 1<=K<=1e9

  • »
    »
    5 hours ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    At what testcase was your answer failing?

  • »
    »
    5 hours ago, # ^ |
      Vote: I like it -40 Vote: I do not like it

    Apologies for this error. We will re-judge the solution which failed due to this and the penalties will be adjusted accordingly.

    • »
      »
      »
      5 hours ago, # ^ |
        Vote: I like it +19 Vote: I do not like it

      What about the time wasted because of that?

    • »
      »
      »
      5 hours ago, # ^ |
        Vote: I like it +19 Vote: I do not like it

      we were stuck on this problem for $$$58$$$ mins, this is not a small mistake? You can't make such mistakes in ICPC....

    • »
      »
      »
      5 hours ago, # ^ |
        Vote: I like it +10 Vote: I do not like it

      when will the problems be made available for practice [wanna submit some solutions]

    • »
      »
      »
      5 hours ago, # ^ |
      Rev. 3   Vote: I like it +12 Vote: I do not like it

      [deleted]

»
5 hours ago, # |
  Vote: I like it +3 Vote: I do not like it

umm , we came 2nd in our college and in top 100 overall, the first place team from our college had chosen amritapuri and one more region and we had only chosen amritapuri , so is there much chance of us getting selected or no? ;-;

  • »
    »
    3 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    +1

  • »
    »
    3 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Amritapuri has more seats and 2 teams from the same institute cam get selected.

  • »
    »
    110 minutes ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You have good really good chances as per the amritapuri selection process.

»
4 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

How can we run backtrack for n=3000??

»
4 hours ago, # |
Rev. 2   Vote: I like it +15 Vote: I do not like it

What is the proof for Small Indices problem that the proposed backtracking solution works in O(n^2). Also could you share the dynamic programming solution of the same?

Update:

The proof is as follows:

b[i] > level (b[i] > sum of 2 previous max numbers) can only occur about O(logn) times.

So at O(logn) times we have 2 choices to explore and hence works in the given time complexity

  • »
    »
    3 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Damn, wild to think brute force works. If someone would have just tried brute force, would work. I did think that it was possible to do so, but I couldn't prove that time complexity would be n**2.

    I think someone randomly used GPT and it got accepted. That's why we might have as many solves as we did

»
4 hours ago, # |
Rev. 2   Vote: I like it +10 Vote: I do not like it

In small indices, if the array size is n then elements of array are <= 2*n and not <= 6000. right? Arpa Enigma27