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

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

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 !!!

Полный текст и комментарии »

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

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

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.

Полный текст и комментарии »

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

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

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.

Полный текст и комментарии »

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