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

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

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.

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

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

Автор ahshafi, история, 3 года назад, По-английски

In 1681C - Двойная сортировка 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?

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

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

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

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) ?

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

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