Ayushrusiya47's blog

By Ayushrusiya47, history, 4 weeks ago, In English

Hello people of Codeforces,

I really hate problems with too many edge cases or difficult implementation, so I've been avoiding such problems for far too long. Because of that I am really bad with casework and implementation. Most of the time I can come up with solutions but fail to implement them before the timer runs out on me. So I have decided to suffer through such problems to improve my implementation skills.

So give me the worst problems you have ever seen, problems with cruel edge cases or a cruel number of cases or problems with implementation much more difficult than their logic. Do your worst and I'll try my best to suffer through them.

Also share any cool implementation tricks you have for the problems with

Spoiler

or any general tricks to make the code smaller.

P.S. Is there anyone who actually enjoys casework !!!

Full text and comments »

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

By Ayushrusiya47, history, 11 months ago, In English

Hi,
I recently watched a Veritasium video based on prisoner's dilemma, a Game Theory problem. In the video he mentioned that a scientist, Robert Axelrod, held a tournament where he invited programmers to submit programs for playing the game and he matched them against each other and scored and ranked them.

This type of tournament sounds really interesting, your programs will not run on fixed test cases but against each other! I tried to find platforms that have these type of contests and I found codingame.com. This website have games where you can submit your bot to play against others. I haven't explored it much yet but it looks interesting.

What is your view on this type of contest, can we get them on Codeforces maybe. Also if you know any other competitions or platforms that have this type of contests, please share.

Full text and comments »

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

By Ayushrusiya47, history, 12 months ago, In English

You are given an array of arrays $$$A$$$ containing integers of the range $$$[1, N]$$$. Now you need to select one element from every array present in $$$A$$$ such that no two elements are same i.e. you need to make a permutation of length $$$N$$$ such that element at $$$i_{th}$$$ index is present in the array $$$A_i$$$. Also find the number of permutations that satisfy this condition.

For example:

A = [
     [1,2,5],
     [3],
     [2,4],
     [1,4,5],
     [1,3]
    ]

[2, 3, 4, 5, 1] will be a valid permutation for this case.

I think I have seen this problem as a subproblem in some questions, but I can not think of anything other than brute force.

Thanks.

Full text and comments »

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