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

Автор baukaman, 11 лет назад, перевод, По-русски

Hardly worked on the following problem(statement in russian, registration is required) but without any success, help plz:

On positive axis (x>0,y>0) Given N blue triangles and M red points. Triangles have one property: they share common vertex at [0,0].

For each triangle we must determine is there at least on red point inside it.

Constraints:
- coordinates are integers between (0,10^9]
- N<=10^5
- M<=10^5
- TL = 2sec

I understand some sort of optimization needed : sweep line or segment tree, but I couldn't figure it out

Do you know how to solve or link to the similiar problems. I would really appreciate.

UPD: You can't probably solve this problem if you don't know segment tree or convex hull or ternary search or if you don't know how to use them together!

Thanks in advance.

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

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

Автор baukaman, 11 лет назад, По-английски

Hello Codeforces community!

I would like to raise a question about masters degree. Do we really need it? Some people claim that we need it only if we're planning to be a teacher at universities or to continue the science path.

For me it is choise between time and diploma[which I don't know will it be of some use in any way]. If I'm going to apply I will contribute 6pm-10pm time every working day , 9 am-3pm on Saturdays, during 1 year, but with diploma in the end. [+ participation to ACM, but I doubt it, since I'm noob]

On the other hand, I may benefit more on my own studying\contesting\projecting\resting etc.

Who of us graduated masters degree, please share your experience. Is it worth of appllying or not. Short period is left and I'm about to make my decision. Need your help\advice.

Thanks in advance!

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

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

Автор baukaman, 11 лет назад, По-английски

This problem is a very beautiful one. Thanks to kattis we can solve it. Direct link to the problem. The problem statement is easy.

I got WA on test 2. My approach is: take number(initially equal to 1) multply it to current prime or next prime. (which we keep track of). Number of this operations is bounded. (~ 3000000 possibilities). And we can apply some greedy. In doing above we ensure that previous primes count is not less than current. So in factorization we will have more 2's than 3, more 3's than 5 etc.

Once we have some combinations of primes we use formula: S! / (s1! * s2! *s3! *...*sk! ) for example number of different permutationos of number 2*2*2*3*3 is 5!/(3!*2!).

finally, answer. We are given 1000 numbers to handle. We just memorise it in some set and try to find the answers.

Please help me out from this situation or describe your approach.My code can be found here.

Big Thanks in advance.

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

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

Автор baukaman, 12 лет назад, По-русски

Сегодня попробовал запустить

#include<iostream>

using namespace std;

int main(){

 long long cnt=0;

 for(int i=0;i<1000000;i++)
 for(int j=0;j<1000000;j++)
 for(int k=0;k<1000000;k++)
 cnt++;

 cout<<cnt;

return 0;}

в запуске codeforces и он работал 31мс. Как такое возможно? в Ejudge тожe не ловит time limit? Может компилятор заранее предпосчитывает сколько надо прибавить? Непонятно...

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

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

Автор baukaman, 13 лет назад, По-русски

Все наверно уже заметили, когда заходишь на пройденные контесты и начинаешь решать задачи то справа на окне написаны тэги к задачам.(И тем самым служат как подсказки ) Хотелось бы попросить администрацию codeforces нельзя ли как то убрать их в другое место?  Заранее спасибо.



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

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

Автор baukaman, 13 лет назад, По-русски
И вновь долгожданный SRM обрадует 250000 программистов со всех концов света. В этом году он к великому сожалению будет последний...
2010 год был нелегкий, пусть все непонимания и несчастья не повторяться в новом году .

В глубине душе мы все дети, никто не может отрицать этого, просто год за годом наши подарки растут вместе с нами, примите этот SRM как подарок. Желаю никому не проспать...


Ну а пока... Че та бин. поиска давно не было....))

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

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

Автор baukaman, 14 лет назад, По-русски
На данное время очень много judge сайтов. Но а как с помощью php (javasript) можно откомпилировать
задачу, запустить, потом проверить правильно или нет.

и еще... если проверка в процессе, как сайт указывает  pending ? (т.е. в процессе)

кто знает ? народ хэлпуйте...плз...

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

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