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

Автор twoplusthree, 18 месяцев назад, По-английски

Hello Codeforces!

We (twoplusthree, VS-Codes, Anupam_Ghosh and om_mittal7) are glad to invite everyone to Replay of JU BitFest Season One 2023 which is scheduled on [contest_time:445869].

BitFest is an annual ICPC-style Programming Contest organised for freshers and sophomores of Jadavpur University. This year marked the very first edition of this contest, which consisted of two rounds — online Prelims and on-site Finals. We hope you like the problems we have created!

You will be offered $$$10 - 15$$$ problems (from the combined problemset of both the rounds), and $$$4$$$ hours to solve them. You may participate alone, or in teams of not more than $$$3$$$ people. The problems vary in difficulty, ranging from Easy to Intermediate. Some of the problems may also require a classical solution. Note that the contest is unrated.

We would also like to thank:

Links:

Good luck, and have fun!

UPD 1: Apart from the Replay problemset, there will be a non-zero number of new problems set by our testers — (Yomapeed, beedle and DrearyJoke), to make the round more interesting :-D. The total number of problems will remain $$$10 - 15$$$.

UPD 2: Registration for the contest is now live.

UPD 3: Contest is live now. Best of luck!

UPD 4: Contest is over. We hope you enjoyed the problems. Feel free to discuss them here. We will release the editorial soon.

UPD 5: Thank you all for participating! Here are the winners:

Rank Contestant(s)
1 kasparovian
2 gupta_nitin
3 Kira_1234
4 Team Badut (floralfield, VincentK, aufannn)
5 Team Kindered_spirits (Coder_Nayak, sloppy_coder, _gyrFalcon_)

First solve for every problem:

Problem Contestant(s)
A benzyl
B Team BhavyaKashyap (bhavya_rajdev, zxy0909)
C gupta_nitin
D1 Team BhavyaKashyap (bhavya_rajdev, zxy0909)
D2 kasparovian
E kasparovian
F kasparovian
G kasparovian
H Team crush ki smile :uwu: (18o3)
I Team skull issu (X-OR, TECHlES, -ZORD)
J Jishudip
K prodipdatta7
L YouKn0wWho

UPD 6: The contest editorial is out! All contest submissions have been made public.

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

»
18 месяцев назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

As a Setter I need contribution

»
18 месяцев назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится
»
18 месяцев назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

Hoping everyone takes part, and finds the problem set interesting!

»
18 месяцев назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

As a setter, I can confirm that Harry Potter fans will like Problem G very much :-D

»
18 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

added to calendar

»
18 месяцев назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

Excited to take part in this contest! Great initiative by the setters and testers :) Would recommend everyone to participate in the contest as it will be surely a great one.

»
18 месяцев назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

Can't wait!

»
18 месяцев назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Excited for this event ✨

»
18 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

As a participants i expect good quality of questions :)

»
18 месяцев назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

Hoping the problem set will be interesting

»
18 месяцев назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

It's the first ever contest on this platform hosted by JU- genuinely excited for this landmark event! <3

»
18 месяцев назад, # |
  Проголосовать: нравится +20 Проголосовать: не нравится

Reminder: Contest starts in less than an hour! Good luck!

»
18 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can someone tell me how to solve K?

  • »
    »
    18 месяцев назад, # ^ |
      Проголосовать: нравится +11 Проголосовать: не нравится

    maintain a multiset of all zombie's health. at any point of time sum of x in first query become greater than any element erase it form multiset and subtract it from total sum. and along with that subtract mst.size() times x as well. The main point is how you are going to reduce the total sum at every step. I wrote these line of code I think you can get a idea out of it.

    int n,k;
    cin>>n>>k;
    vector<int> vt(n,0);
    multiset<int> mst;
    int sum = 0;
    for(int i = 0;i<n;i++){
        cin>>vt[i];
        mst.insert(vt[i]);
        sum += vt[i];
    }
    
    int td = 0;
    for(int i = 0;i<k;i++){
        int t;
        cin>>t;
        if(t==1){
           int x;
           cin>>x;
           // td = x;
           while((*mst.begin()<=td+x)&&(mst.size()>0)){
             sum -= (*mst.begin()-td);
             mst.erase(mst.begin());
           }
           td += x;
           sum -= (x*mst.size());
           // cout<<sum<<" "<<x<<" "<<mst.size()<<endl;
        }
        else if(t==2){
           int y;
           cin>>y;
           sum += y;
           mst.insert(y+td);        
        }
        else{
           cout<<sum<<endl;
        }
    }
    • »
      »
      »
      18 месяцев назад, # ^ |
        Проголосовать: нравится +7 Проголосовать: не нравится

      This is one of the most elegant solutions I have seen! Really nice approach to inserting new elements and also handling the old elements.

  • »
    »
    18 месяцев назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Keep a priority queue in max heap containing the health of the zombies and keep a variable denoting total sum.For query type 1 ,add x to total damage and keeping popping elements untill top element <= total damage so far and subtract it from sum as its dead.The sum of health of alive zombies is sum of their initial health — no.of zombies alive * total dmaage so far.While adding a new zombie for query type 2 consider its health to be (y + total damage so far) and push this to priority queue

  • »
    »
    18 месяцев назад, # ^ |
    Rev. 8   Проголосовать: нравится +4 Проголосовать: не нравится

    Code Link

    Thankyou authors for such a nice problemset.

»
18 месяцев назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

Problemset were good, Is there editorial available for this contest?

»
18 месяцев назад, # |
Rev. 2   Проголосовать: нравится +17 Проголосовать: не нравится

Really cool problem set!

»
18 месяцев назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

wow. i enjoyed very much. What a problem these are. thank you very much all authers.

»
18 месяцев назад, # |
Rev. 3   Проголосовать: нравится +17 Проголосовать: не нравится

Nice Problemset.Enjoyed.
How to solve L / E ?

  • »
    »
    18 месяцев назад, # ^ |
      Проголосовать: нравится +11 Проголосовать: не нравится

    For E:

    Tutorial
    Implementation
»
18 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

can you please make the submissions public

»
18 месяцев назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

twoplusthree can you tell me how you made {You} of LGM colour?

»
18 месяцев назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

I really had fun solving the problems. Short Problem Statements with good logic and implementation. That's what I crave for.

Really Good Initiative.

»
18 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Enjoyed the contest. The problems were really cool as they have short statement with proper informations. Although I could manage to solve only 4 of them. More specifically loved the problem "Fine De" which I manage to solve using binary search. I want to know is it possible to public others submissions?

  • »
    »
    18 месяцев назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Great to hear that! We'll be posting the Editorial of the contest quite soon, and all the contest submissions will be made public after that. This is done so that those who wish to can spend a little more time pondering upon the problems :-)

»
18 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone tell me some hints regarding Problem G : Gringotts. I am thinking in this Direction — Let's suppose there are 'X' gold coins and 'Y' silver coins, then according to question, equation :- X*g + Y*s = n, and my answer is 17*X + Y. So, we have to increase the value of 'X' as much as possible, that is to find smallest value of 'Y', such that, (n - Y*s) % g = 0, what will be this minimum 'Y'. This was the direction I was thinking for, Is it right, If it is, then how to proceed further, as we have also constraints of Test Cases <= 10000

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

    What if the weight of gold is so high that replacing it with silver is not optimal. Think about any such case.

  • »
    »
    18 месяцев назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    also we can consider that if 17*s>=g, that amount which we can remove (of s) to convert it to g would always need to be a multiple of the lcm of both g and s. So here's an easier way of understanding it (in my opinion).

    then we can easily find the quantity of g and s and compute the answer.

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

      Also it gives a time complexity which can pass all the tests. (logarithmic due to taking the gcd using in-built function)

»
18 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

any hints for C ?

»
18 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Contest was really fantastic, and its a humble request to organizers and setters of this contest, That please provide the tutorial and make submissions public. twoplusthree

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

    The editoral is out now, and all contest submissions have been made public. Apologies for the slight delay.