Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

heyyolol's blog

By heyyolol, history, 2 months ago, In English,

Hi, as far as I know, the O(1) convex hull trick (using either vector or deque) requires the lines to be inserted in strictly increasing gradients.

However is there a condition that must be satisfied for x in the query part? I have always previously thought for a maximum finding convex hull, x must be queried in increasing order, however there was one question which i managed to AC by ignoring the fact that x in the query must be increasing. So was the TCs weak? or was what I had previously thought wrong lol?

Btw what i did in the question: sort the lines by increasing m, where i'll set m to be the gradient of the line which I'll insert, and do query(-2*m) (Maybe it's something to do with the negative? I'm not too sure)

Thanks in advance.

Read more »

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

By heyyolol, history, 3 months ago, In English,

Does anyone want to help explain the formula for counting number of permutations with no hits to the main diagonal: https://oeis.org/A003471 ? It was needed in one of my country's training contest yesterday, so I'm interested to find out more about how the formula is derived. Thank you!

Read more »

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

By heyyolol, history, 7 months ago, In English,

Right now, when i type "open code.cpp" in the geany virtual terminal, geany opens "code.cpp" in a new instance, instead of the current running instance. Is there a way to configure the settings such that geany will open the file in a current running instance instead? Thanks for ur help. :) (I tried google, but I didn't find any solutions)

Read more »

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

By heyyolol, 7 months ago, In English,

Given three numbers A, B, C (up to 2 decimal places).

where 0 < A, B, C <= 10000000000

U may arrange them in any order, let X be the first number, Y be the second and Z be the third.

U want to maximise X^Y^Z (where ^ stands for exponentiation)

Output the order which u would arrange A, B and C to achieve the optimum answer.

Thanks in advance :)

Read more »

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

By heyyolol, 8 months ago, In English,

Hi, does anyone here know whether the organisers are intending to publish the test data?

Thanks in advance. :)

Read more »

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

By heyyolol, 9 months ago, In English,

Can someone teach me how to do this qn? I tried finding the announcement blog, but there wasn't any solutions posted about this qn and google translating the official editorial didn't work well enug for me to understand.

https://oj.uz/problem/view/JOI18_wild_boar

Thanks in advance!

Read more »

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

By heyyolol, history, 10 months ago, In English,

Hi, recently I noticed that JOI SC and final round problems (from 2016 and before) were not available in English. I know google translate is an option, but sometimes that doesn't really work very well enough to understand the question. So may I ask if any of ur know if there is any online judge which had them translated?

Thanks in advance. :)

Read more »

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

By heyyolol, history, 11 months ago, In English,

Hi everyone, does (2D range add update, and range sum queries) fenwick and segment tree exist?

If there is could someone kindly provide me ur code? Thanks :)

I tried googling but I didn't find anything really useful. :( Edit: Like by range I mean for e.g. (a,b) to (c,d), for a<=c && b<=d.

Read more »

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

By heyyolol, history, 11 months ago, In English,

Given n (<= 10^5) bitmasks of length k (<= 22) find number of pairs of bitmasks which AND to 0. Time limit is 2 secs

Can anyone provide an idea for this? Thanks! :)

Read more »

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

By heyyolol, history, 11 months ago, In English,

Recently I tried using getchar to take in char input (c++), the sample works fine on my compiler , but got idleness limit exceeded on judge, I tried the code in custom invocation, and it turns out getchar was reading random characters lol. My code is something like

for(int i=0;i<n;++i) for(int j=0;j<n;++j) while(grid[i][j]!='.'&&grid[i][j]!='#') grid[i][j]=getchar()

Does anyone know how to fix this problem? Thank you!! :)

Read more »

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