adityagamer's blog

By adityagamer, history, 7 months ago, In English

I am getting compilation error with C++20 : https://codeforces.net/contest/1946/submission/255765529

Same code in C++ 17 : https://codeforces.net/contest/1946/submission/255766072

The error logs seems to be warning. And It was not a compilation error before C++ 20 was removed.

Full text and comments »

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

By adityagamer, history, 10 months ago, In English

Whats wrong with my solution for problem E : https://codeforces.net/contest/1342/problem/E?

Let c = n-k. Number of ways such that c columns are filled = (Number of ways such that <= c columns are filled) — (Number of ways such that <= c-1 columns are filled)

So formula is $$$ \binom{n}{c}c^n - \binom{n}{c-1}(c-1)^n $$$

Full text and comments »

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

By adityagamer, history, 20 months ago, In English

Source: Interview

There is grid 'a' of size n*m. There is a guy on cell (1,1) and he wants to reach (n,m). He can move either down or right. Initially, he has health H. If he gets on cell (i,j), then a[i][j] is added to his health. If his health becomes less than or equal to 0, he dies.

Find the minimum value of H so that he can reach the cell (n,m).

I told her binary search but she asked to remove log factor.

How to solve this?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By adityagamer, history, 2 years ago, In English

I see people frequently criticizing the problems which is implementation heavy or requires too much mathematical equation. I feel all the problems are good.

I want to others opinion on what is a good problem. So what are qualities of a good problem according to you?

Full text and comments »

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

By adityagamer, history, 2 years ago, In English

What is your favorite codeforces community moment? Here are my top 2 favorites:

Full text and comments »

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

By adityagamer, history, 2 years ago, In English

Hi MikeMirzayanov

I have been recently experiencing a few bugs:

  1. Around 30-40% of times when I click right click on submit button and select open in new tab, The problem ID is not automatically filled. This being too often while solving from problem set is sometimes frustrating.

  2. (It is recently happening in all ongoing contest) I opened dashboard, solved problems on different tab. I refresh the dashboard tab after some minutes and I get "?f0a28=2" this added in the URL. I refresh after sometime again. I get "?f0a28=x", x is the times I refreshed. After around x=4, I get error 403. The problem gets fixed when I remove "?f0a28=x" from URL and enter again.

Thanks.

Full text and comments »

Tags bug
  • Vote: I like it
  • +14
  • Vote: I do not like it

By adityagamer, history, 3 years ago, In English

Debugging interactive problem is very hard for inexperienced and new programmers.

I have seen google code jam providing the interactive program when they ask interactive problem which helps in debugging the program locally.

Also, giving the interactive program will neither spoil any answer nor it will take any extra effort, as you would have already written it.

Don't you think this will improve the experience of users?

Full text and comments »

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

By adityagamer, 3 years ago, In English

This is my solution: Solution(Not visible) Check my code below

For question : Question

It is giving TLE on Test 3.

My code

My solution is in O(t.log(p)).

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By adityagamer, 3 years ago, In English

Codeforces does not have a feature to view available blogs.

If you want to view a list of codeforces blogs, you have to manually randomly try some blogid. I have written a python script which returns you id and name of blog in range of blog ids.

It is very simple script but it is very useful.

https://github.com/adityagamer786/Codeforces-blogs

Full text and comments »

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