### usureluflorianr's blog

By usureluflorianr, history, 7 months ago, ,

Hey! Does anybody have a solution in n log n for this? Given n rectangles, determinate a point which is included by a maximum number of rectangles (including the boundaries).

• +34

By usureluflorianr, history, 7 months ago, ,

Hey! Does anybody know how to solve this? Given n segments, count how many pairs of segments have a common point. There are no 2 overlapping segments and the segments are can make any angle with the origin of the cartesian plane.

• +6

By usureluflorianr, history, 7 months ago, ,

Hey! Can anybody help with this problem? This problem says that we are in a point (x,y) and we have n lines (defined by the line's equation a,b,c). How many lines can we see from that point? If we see only a point of a line, we do not consider that line at all. I think we should find the intersections of all the lines firstly, but I do not have certain ideas. The number of lines is 10.000, does anybody have ideas?

• +3

By usureluflorianr, history, 7 months ago, ,

Hey! I discovered a type of problems where we have for example n points and we want to discover the convex hull (the border) using some of those points, but after that calculate the area of the smallest rectangle in which that convex hull can lie inside. I saw that we can rotate the convex hull with some degrees, but I didn't understand it very well. Can anybody give me more details about how to rotate a convex hull with sin and cos, some links eventually. Thanks!

• +3

By usureluflorianr, history, 8 months ago, ,

Hi! Is anybody who can give me a solution for this? We have an array with n elements and a number k. We are asked to calculate in how many continuous strings of size exactly k (k is even), the element at the i-th position is in the second half if we sort that continuous string (all values are different). We want to calculate this value for every single position*. Example: n=6, k=4, the array: 1 4 2 5 9 3, the output will be like this: 0 1 0 3 2 0

• +13

By usureluflorianr, history, 9 months ago, ,

Hey! I have a question. If I have to calculate a pow b modulo mod, with b>mod, is it the same with a pow (b % (mod-1)?

• +29

By usureluflorianr, history, 11 months ago, ,

Hi! I encounter difficulties in understanding a well known fact in number theory. Given a number n, in how many ways can we write n as a sum of numbers? Exemple: 4 -> ( 4 ) ( 1 3 ) ( 2 2 ) ( 1 1 2 ) ( 1 1 1 1 ) Many thanks for those who can help me

• +11

By usureluflorianr, history, 15 months ago, ,

Hey guys, I am returning to you with a problem. Given n numbers a1 a2.. an, find the substring (some consecutive nummbers) with the maximum xor string.

I know that we must use a trie, but I don't really know how. Can anybody explain me please?

• +1

By usureluflorianr, history, 15 months ago, ,

Hey guys, can anybody explain me well how can we find (and when we can't find) (x,y) such a*x + b*y = c?

• +1

By usureluflorianr, history, 19 months ago, ,

Hey guys! I need your help. Lately I tried to make a program which check if a point is inside o polygon, I did it in N^2 for convex, I didn't find a brute force for concave. So if you can help me, I would be grateful for an implementation or a link for concave (brute force) and an implementation for faster running time, I know the idea behind it, but my implementation have some bugs and I want to see a corect one. That from geeksforgeeks is not correct if you think about it. Thanks in advance!

• +1

By usureluflorianr, history, 20 months ago, ,

Hey, I am encountering difficulties with this problem: http://codeforces.com/contest/919/problem/D from yesterday contest. This is my code commented. Can anybody tell me what is wrong with my logic? My first failed test case is #6, I count more than I should. code : http://codeforces.com/contest/919/submission/34816679

• +5

By usureluflorianr, history, 21 month(s) ago, ,

Hey guys! Lately I tried to understand more about game theory, but I have some uncertainties. Does anybody have a good article or a good explanation regarding Staircase Nim and the relation between Sprague-Grundy and mex()?

• +1

By usureluflorianr, history, 22 months ago, ,

Hey guys, can you please give me some sources with easy BIT 2D implementation? I would be grateful also for some problems using this from easy to hard. Thanks in advance!

• +6

By usureluflorianr, history, 22 months ago, ,

Hey guys, recently I started to deepen algorithmic science. I relised that dynamics include a huge amount of techniques and approaches, I know some of them, but I'm not good at dinamycs with bits/masks for example. I don't know also many things in combinatorics like "the number of sequences such that their sum is t" which is 2^(t-1), not really this, but combinatorics like this. So I'm asking you for help. Can you give me please some useful links or name of methods? I would be greatful.