_shanky's blog

By _shanky, history, 4 years ago, In English

In yesterday's Div2 E I was stuck at finding the shortest cycle. I was using dfs and each time a backedge (x,y) occurred I was keeping the minimum of level[x]-level[y]+1 only to realize it was wrong. The answer would depend on the order of dfs traversal. So I randomly shuffled adjacency lists few times and used dfs each time while keeping the minimum. I managed to pass all test cases. Is there any proof that the correct answer will be found with high probability with this approach or I just managed to be lucky?

Link to the submission

Full text and comments »

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

By _shanky, 5 years ago, In English

Hi, Codeforces Community!

Codefest'19 — a diverse roster of high-quality programming competitions by Department of Computer Science and Engineering, IIT Varanasi is excited to present Mathmania.

Mathmania is a mathematical puzzle contest where a sound knowledge of mathematics together with computational thinking will be essential to solve problems. The motivation behind Mathmania is to provide a platform for the inquiring mind to dwelve into unfamiliar areas and learn new concepts in an exciting way.

The contest will take place at Hackerrank. This contest will be an individual event with a duration of 3 hours, from Aug/24/2019 20:00 IST. The contest will consist of interesting mathematical challenges covering almost all domains of Mathematics, ranging from Number Theory, Algebra, Geometry, etc.

The contest has been prepared by hitman623, _shanky, daddy_is_home and _hiccup.

Prizes -

1st Place: INR 20000

2nd Place: INR 12000

3rd Place: INR 8000

1st Place, India: INR 6000

1st Place, IIT(BHU): INR 3000

1st Place among freshers (1st and 2nd year), IIT(BHU): INR 1000

You can find the previous year's Mathmania here:

Mathmania-Codefest'18

Mathmania-Codefest'17

UPD: Participants will be offered 12 problems and 3 hours to solve them.

UPD1: The contest starts in an hour.

UPD2: The contest starts in 5 mins.

The contest is over. Thank you everyone for participating.

The editorials are up and the solutions are public.

Hope you enjoyed the problems. The winners will be contacted soon.

Full text and comments »

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