Alex7's blog

By Alex7, 9 years ago, In English

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..

Full text and comments »

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

By Alex7, 9 years ago, In English

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

Full text and comments »

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

By Alex7, 9 years ago, In English

What music do you listen to while coding ???

Full text and comments »

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

By Alex7, 9 years ago, In English

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

Full text and comments »

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

By Alex7, 9 years ago, In English

I've been thinking about this problem a couple of days now, and I couldn't solve it, can you please help me?

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

Full text and comments »

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

By Alex7, 9 years ago, In English

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

Full text and comments »

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

By Alex7, 9 years ago, In English

I made this problem please try to solve it..

Your comments/solutions will be helpful :D :D

Full text and comments »

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

By Alex7, 9 years ago, In English

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

Full text and comments »

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

By Alex7, 11 years ago, In English

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...

Full text and comments »

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

By Alex7, 11 years ago, In English

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

Full text and comments »

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

By Alex7, 11 years ago, In English

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 Pepe.Chess. 3- Aleksandar Abas Alex7. 4- Gaith Hallak Gaith.

Full text and comments »

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

By Alex7, 11 years ago, In English

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.

Full text and comments »

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

By Alex7, 11 years ago, In English

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

Full text and comments »

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