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

Автор filo, история, 5 лет назад, По-английски

Hi,

Relatively new to Python,

Here are two solutions one gets run time error another one gets accepted, basically the difference between two is that the first one uses DFS and the second one BFS. I know Python has limited stack size by default, that's why I increased it to 2000000, but didn't help, any idea why?

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

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

Автор filo, история, 6 лет назад, По-английски

Hi all,

I know Go isn't the most popular language when it comes to competitive programming but since it is added on CF I will ask this question.

In this problem I try to read two strings, the problem is that Go's bufio.Text() or bufio.ReadLine() cannot read million characters in one string.

I've tried lots of other options as well(already -57 on that problem), like increasing buffer size for Scanner, or concatenating parts of strings returned from bufio.ReadLine() but all of them gets TLE.

I am almost sure that the solution itself is pretty fast and the problem is in reading from the input.

If you have any idea how to speed it up you are welcome!

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

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

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

Hello all,the title says everything,cannot figure out what's wrong,if you've any advices post in comments please.Thanks for your time. Link to problem. Link to my code.

UPDATE: got AC

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

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

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

So this problem is about finding the closest pair of points on the plane,here's my code which gets TLE. I think my code should work in logarithmic time,but it doesn't seem so.So I kindly ask to provide any advices or improvements,for those people who will try to help me,for simplicity,comments are inserted in the code.

Thanks.

UPDATE: Got accepted thanks to Alex_2oo8's observations,no more help needed

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

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

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

Hey guys,recently I've been stuck on this problem,I've written greedy solution and on the test cases I've tried the solution I've submitted gives the correct answer,anyways on judge I've WA.Here's my code . I'll describe algorithm later,if it is necessary.Thanks in advance ;)

UPDATE:

got AC,had to add one if statement :|

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

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

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

cannot enter TC Arena the whole day,does anyone have the same problem or it's just me?

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

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

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

After this contest (138 div2) my rating has been decreased two times for the same contest(look at my profile for details).Any ideas why this could happen?

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

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

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

Hi,i'm going to start learning java,if you know any useful links that will help please write in comments.Thanks in advance :)

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

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