ahshafi's blog

By ahshafi, history, 13 months ago, In English

Looks like cf is having some problem with my network configuration. Can't submit from my laptop which runs Ubuntu 22.04.2 LTS (the submission icon loads then just disappears). Using Vpn solves the issue . However not facing the same problem when submitted from my desktop Windows/Ubuntu which uses the same internet connection. Tried other browsers(i.e. Chrome, default is firefox) and cleared cache but the issue remains :(. What could be the actual issue?

UPD: the issue is weirder than I thought. I am only facing this issue when I submit this particular code. Link: https://pastebin.com/D4ZJL6UM . No matter how I change the code the problem remains. As before using vpn solves the issue.

Full text and comments »

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

By ahshafi, history, 23 months ago, In English

In 1681C - Double Sort of last Educational , I sorted the vector {0, 1, .... n-1} using the following comparison function

bool comp(int &i, int &j)
{
	return a[i]<=a[j] and b[i]<=b[j];
}

This resulted in RTE. Submission link

Then I used a tuple vector of (a[i], b[i] , i) instead and sorted it with default STL comparator which however gave AC. Submission link Has it something to do with the comparator?

Full text and comments »

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

By ahshafi, history, 5 years ago, In English

Segment tree can be efficiently and shortly implemented using bitwise operators . Is there any way to implement lazy propagation update operation using bitwise operators (i.e. using no recursive operations) ?

Full text and comments »

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