vishaaaal's blog

By vishaaaal, history, 3 years ago, In English

       

Hello Codeforces!

From the infinite possibilities of the multiverse, Spider Man has found out the one and only one way to save the world from collapsing. You being his comrade must assist him in saving the world in the best possible way !

RECursion presents you Alohomora — an ICPC-styled team coding contest where you would have to assist Spiderman in teams of at most 3 people against an unwanted disaster. The contest will start on April 10 2022 at 9:00 PM IST. Contest duration is 2 hours 30 minutes.

We are also giving away prizes for top performing teams of our contest as follows :

  • Cash prize of Rs 5000 and Rs 3000 respectively for the top 2 performing teams.
  • Cash prize of Rs 2000 for the top performing Indian team.
  • Goodies for the top performing team from NIT Durgapur.

Regarding any queries, please contact :
Vishal : +91 9079971627
Saptarshi : +91 89278 53473

RECursion wholeheartedly invites you to take part in Alohomora!

Happy Coding :))

UPD: The contest is to start in less than 1 hr. Do register if you already haven't. Hope you enjoy the round!
UPD2: The contest has started! We hope you enjoy the problems.

UPD3: The problems have been moved to the practice section and editorials to all of them are out! Have a look at them at :
PETER
XOREASY
GREATSACK
VULTURE
DRSTRANGE
GOBLIN
HIGHWAY
SPIDEY

Full text and comments »

  • Vote: I like it
  • +42
  • Vote: I do not like it

By vishaaaal, 3 years ago, In English

Hello Codeforces!

Attention all players, the game is about to begin.

RECursion, the coding community of NIT Durgapur is glad to invite you to RECode 20.0 — an open to all contest which will be held on 15 November 2021 at 21:00 IST.

The contest is themed around your recent favorite series Squid Game! :))

You will be given 6 problems and 2 hours to solve them. It is highly recommended to read all the problems.

We present our special thanks to CodeChef for enabling us prepare and present the contest on such an amazing platform.

Prizes distribution are as follows :

  • Cash prize for Rs. 3000 for the overall top performer.
  • Cash prize of Rs. 2000 for the top performer from NIT Durgapur.
  • Certificates for all top performers.

For further details, contact :
Rushil : +91 85113 08746
Ankit : +91 8420998766

See you on the leaderboard!
Happy Coding :D

PS : As a gentle reminder, the contest is about to start in less than 30 minutes.
Good luck to all the participants! :)

PS : Editorials can be found here :-
Problem A — Marbles
Problem B — Deok-su and his Debts
Problem C — Ddakji
Problem D — Glass Stepping Stones
Problem E — Guard Quarters
Problem F — A Way Out

Full text and comments »

  • Vote: I like it
  • +9
  • Vote: I do not like it

By vishaaaal, history, 3 years ago, In English

Consider an array of length $$$n$$$ and we want to count the number of increasing subsequences such that their length is the maximum among all different increasing subsequences in this array(obviously the count can be more than 1). What will be the asymptotic bound on our answer?
In other words, what is the order of our answer? Is it $$$O(n)$$$ or $$$O(nlogn)$$$ or $$$O(n^2)$$$?
Consider all the elements in the array distinct. Can we also expand the same solution for arrays with multiple occurrences of elements?

Full text and comments »

  • Vote: I like it
  • +19
  • Vote: I do not like it

By vishaaaal, history, 3 years ago, In English

I just wanted to do it okay. NO OFFENCE for Amrita, they might have there own reasons.

Here we go

Full text and comments »

  • Vote: I like it
  • +16
  • Vote: I do not like it

By vishaaaal, history, 3 years ago, In English

If this quarrel was a meme.

Conclusion : Bugaboo wins!
Hail Bugaboo!

PS :

Adding one more lol

Full text and comments »

  • Vote: I like it
  • +263
  • Vote: I do not like it

By vishaaaal, history, 3 years ago, In English

Hello there!

I was trying to solve E-Partition Game from yesterday's round. And for those who have solved it, you know it can be solved using Segment Tree with Lazy Propagation(there might be other faster solutions, which I don't know). I use my (small) segment tree template when I encounter a problem on it and I did the same here and it got Accepted with a runtime of 2542ms(though the average runtime of submissons is around 1700ms maybe).
You need not read and understand or debug the implementations but only compare the class based implementation(can be found above the main function) of Segment tree across a few submissions :).
Anyways, I later changed the implementation slightly so that the update and query functions are declared inside the class and defined outside. And the runtime jumped to 2760ms. Then I also changed the implementation of createTree function in the same way, declared it inside the class but defined it outside and the runtime jumped to 2838ms! This "jump" runtime might be justified by the fact that the code is already slow and slight variations can cause bigger effects. However, I am not sure about it.
I tried to change the implementation a bit more and used "intermediate" functions. First I changed the normal update and query functions to update_ and query_. And created update and query functions to improve user interface.

update
query

And the runtime reduced to 2792ms.

Now I don't understand why this is happening. Is it because class based implementations are slow? But many great coders use class based implementations for their templates and they are super fast! If there is a way to convert DS/algorithm codes to efficient class based implementations, then please share you knowledge about it here. I want to write my own implementations but almost all of them turn out to be slow when done with classes :(.

Thanks for reading!

Full text and comments »

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

By vishaaaal, history, 4 years ago, In English

Hii!!! I took part in the Atcoder ACL contest 1 held a few days ago. Unfortunately, I am getting wrong answer in the first problem Reachable towns, here is my submission.

All I have done is to sort all cities according to x keeping their city numbers, and connect each city to next city with greater y and x coordinate than it with a bidirectional edge, and finally answer will be the size of connected component of graph for every city. Please tell me if I am incorrect somewhere.

Thanks in advance!!

Full text and comments »

  • Vote: I like it
  • -4
  • Vote: I do not like it

By vishaaaal, history, 4 years ago, In English

Hii!! I was wondering about problem-setting on codeforces and came across many blogs. Many of them explained problem-setting, creating ideas and writing solutions, but apart from them, I want to know about major steps we will take when getting involved in the process. The first is, we submit a problem proposal.

Then when our problem gets approved, what are we supposed to do? Visit polygon? Where will we create our test set and discuss about the problems with others involved in the contest? Where are the checkers and validators written? If I am not a codeforces user, can I still write problems on codeforces using polygon only?

I have never used polygon and never set a problem, so I want to have an idea of important phases I need to complete to finally publish the problem.

It will be great if you share a tutorial on using polygon. Thank you so much!!

UPD: Thanks a lot C137 for this amazing tutorial on using codeforces. I hope it helps to all of you.

Full text and comments »

  • Vote: I like it
  • +25
  • Vote: I do not like it