### Alex7's blog

By Alex7, 5 years ago, ,

I'm currently instructing a new group of students that are interested in pursuing competitive programming, and I'm looking for problems that would suit them (they just learnt C++).

Also any advice for their long-term training would be deeply appreciated..

• +4

By Alex7, 5 years ago, ,

How to make Visual Studio 2012 pause, without having to add system("pause")???

• +4

By Alex7, 5 years ago, ,

What music do you listen to while coding ???

• +14

By Alex7, 5 years ago, ,

I tried to find the proof of the complexity of the Union-Find algorithm (The one that utilizes union by rank and path compression) but I couldn't find it anywhere, so please comment a link or something :D

• +7

By Alex7, 5 years ago, ,

Given N companies, M sectors (sectors are adjacent and circular m is adjacent to 1) and Q queries

each query L,R, X means that sectors in the range [L,R] will get +X meteors each

Each sector is owned by a company and gets all meteors that fall in it

Each company wants to collect a certain amount of meteors.

output for each company the time when it collected the amount it wanted..(The number of the last query it required)

N<=3*10^5,M<=3*10^5, Queries <=3*10^5

• +28

By Alex7, 5 years ago, ,

Here is the deal, I have about 7 months of free time that I plan to invest in training... But I'm looking for the best training strategy so if you have any advice, it will be appreciated. P.S. I'm will participate in IOI 2015

• +4

By Alex7, 5 years ago, ,

• +19

By Alex7, 5 years ago, ,

So I've just been reading that the proof that sum of all natural numbers

1 + 2 + 3 + 4... = -1/12

the mathematical proof is sound but it causes some problems like:

how come the sum of 2 natural numbers is a fraction???

my answer is because we aren't dealing with a natural finite number

but I'm not sure how to mathematically explain it

Any ideas??

(Before you rush into saying that the sum is wrong please do some research)..

• +6

By Alex7, 6 years ago, ,

Hello guys, I need some help with this problem.. spoj.com/problems/MHLAR10 I tried to solve it this way: After checking if a solution exists, I compress all values and then sort them (if a begining and an end are equal, I put the begining first)

dp[i][k]: is the number of ways we can cover the interval [1...i] using an interval that ends in k (k<i) so dp[i][k]=sum (j=i-1 .... j=1) dp[k][j] getting WA my solution fails 8 test cases of 435. Help me please...

• +6

By Alex7, 6 years ago, ,

Hello I have a problem viewing submissions , when I click the submission link nothing happen

I've tried it on Chrome and Waterfox (64 bit firefox) same result.

Also I've tried updating my plugins but still the problem remains.

Any help would appreciated

• +8

By Alex7, 6 years ago, ,

isn't it time to make a blog with the handles of IOI 2013 contestants?? I'll start with the Syrian team:

1- Hasan Jaddouh kingofnumbers. 2- Hussain Karra Fallah blackjaguar97. 3- Aleksandar Abas Alex7. 4- Gaith Hallak gaith.

• +22

By Alex7, 7 years ago, ,

I've read the topcoder tutorial about finding LCA using dp (this one) but I couldn't understand how the query function work. Any help would be appreciated.

• +4

By Alex7, 7 years ago, ,

Hello, please help me find out why my code is getting WA in MTRAIN. My algorithm works this way... 1st BFS from Mirko and mark all edges he can visit. Then start another BFS from Slavko: Slavko can pass a certain edge E1 if there is an Edge E2 which Mriko can pass and the distance between both end points of E1 is <= d. There is a special case that Mirko can't go anywhere and Slavko can travel through edges around them so I calculate the distance between E1 and the starting point of Mirko. Another case is when E1 can be passed while Mirko travels through several edges so if the first test fails I try to do an reversed version where I bfs from Mirko's graph and see if I can reach 2 edges that are close to both end points respectively. Here is my code