Блог пользователя radoslav11

Автор radoslav11, история, 5 лет назад, По-английски

We invite you to participate in CodeChef’s March Lunchtime, this Saturday, 19th March, rated for all.

Time: 8:00 PM — 11:00 PM IST

Bangalore-based credit management app giant CRED is on board to hire candidates from the Chef's pool.

Who can apply?

Anyone with 1-3 years of experience in product development, architecture, and design. In short, 2019/2020/2021 graduates are eligible to apply.

Where is the application form?

Visit the March Lunchtime contest page to check the JD & application form.

Joining me on the problem setting panel are:

Prizes:

  • Top 10 global Division One users will get $100 each.

  • Top 25 Indian Division One coders to get Amazon Vouchers worth Rs. 1500 each.

Also, announcing Scholarship for CodeChef Certification in Data Structure & Algorithms — More than 100 Indian participants in Divisions 1, 2, and 3 will win scholarships for the CodeChef Certification exam (discounted prices). Scholarship criteria can be found in the respective contest pages.

The video editorials of the problems will be available on our YouTube channel as soon as the contest ends. Subscribe to get notifications about our new editorials.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here. Hope to see you participating.

Good Luck!

  • Проголосовать: нравится
  • +113
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

How to solve Mathology for full points? I was able to solve only 2 subtasks (5+10 score).

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится

    Same..

    I tried square root decomposition and segment tree ideas but they didn't work within TL.

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    My solution was like this:

    Initialize an array $$$mx[n]$$$ with all values equal to $$$1$$$.

    Iterate over the array $$$a$$$. While iterating at index $$$i$$$, iterate over all the divisors of $$$a_i$$$. Let the divisor we are iterating currently be $$$d$$$. Find the maximum index $$$j$$$ such that $$$j \lt i$$$ and $$$d$$$ is a divisor of $$$a_j$$$. Now, update $$$mx_j := max(mx_j, d)$$$. After processing all the divisors of $$$a_i$$$, we can process all the queries having $$$r = i$$$. The answer of each query having $$$r = i$$$ is $$$max(mx_l, mx_{l+1}, mx_{l+2}, ..., mx_r)$$$ which can be solved using segment tree.

    The complexity is $$$O(n\times k \times \log{n})$$$ where $$$k$$$ is the maximum number of divisors of a number which is $$$128$$$ for $$$a_i \leq 10^5$$$.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +13 Проголосовать: не нравится

In Mathology, after a trivial observation, that it is optimal to choose a subsequence of size 2, the problem becomes the same as this problem

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

I missed 100 points and 27 rank because of that :/

for (int i = 0; i <= n; i++) adj[i].clear();

SPRALL has multi-testcases and i forget to clear the array :/ I only remembered 1 second after the contest

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Should Have Solved SUBSEQ first :-(