Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

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

Автор Fear_Is_An_Illusion, история, 3 года назад, По-английски

Hi everyone,

When you thought 2020 cant get any worse, yes, it did, the legend has returned.

I have improved my english of late, but same cannot be said about my contest skills. I will give contest today and find out.

It is been a difficult year, but yes I'm alive, as of now.

I do backend engineering work and cloud stuff, I get by, university wasn't meant for me.

To all the new people, I have one advice : Code more, and do not post like me.

But times have changed so have I.
Just like the water flows,
Slowly through the rocks
Centuries pass by like seconds,
And at the end of the day.
A canyon is born.
Time changes all.

Love you all my codeforces family.

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

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

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

I know we all miss the old rating calculation formula

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

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

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

I hacked my own solution for fun, but what surprises is the fact the previous solution with no bug also displays hacked. When i try to hack that code again, it shows unsuccesful hacking attempt..

code with error

code without error (submitted before)

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

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

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

today my birthday , I want to share happiness of my birthday with codeforces users, codeforces best site

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

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

Автор Fear_Is_An_Illusion, история, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

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

how are these submissions judged ? do they reverse run taking the output as input and see if it satisfies the original input conditions ?

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

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

Автор Fear_Is_An_Illusion, история, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +56
  • Проголосовать: не нравится

Автор Fear_Is_An_Illusion, история, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

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

How about adding basic filter in submissions of individual users, like seeing only accepted solutions or seeing only TLE solutions ?

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

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

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

I like graph and geometry problems. These problems I can see solution and draw for small values, which I really like.

I don't like BIT manipulation at all.

What do all you like and not like ?

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

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

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

hello, in this sum question I have been trying to implement a modified dijsktra but fail. I just want to know if modified dijsktra work here.

please don't give further hints

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

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

Автор Fear_Is_An_Illusion, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

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

Hi i am back, here is some russian, i love russia

деления места разрыва между сокращенной и полной версией

Используйт (на отдельной строк Содержимое: ваши изменения, е модификацию раньше вас оящий момент текст редактир Блог Избранное Команды Попытки Переписка Соревнования редакти

е русский язык для записи тегов. Все теги будут использованы в нижнем регистре. Примеры: "геометрия", "gcj". Интернациональные слова и сокращения записывайте по-английски, на :) :)

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

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

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

This Sum, is very nice one, however I can't seem to understand how to prove the formulas in the editorial.

If someone can prove and explain these, then it'll help me apply these to more general cases. Thanks

Editorial

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

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

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

Hi, how to edit the default C++ build file in sublime so that it automatically compiles with c++ 11 / c++14 ?

please no suggestions on adding custom build files, I know that already.

Sorry for bad english and bad C++ knowledge

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

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

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

Hi , every one, I am unable to understand the test filter in solution page.

Advice is welcome :)

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

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

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

Can anyone say the most time efficient method ?. Thanks and sorry if it is easy question.

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

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

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

The last round for advancing into round 2 starts today at 12:00 MSK

Good luck

Edit : Its over, congrats to all who made it.

Practice Link thanks StoneCold_ for the tip

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

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

Автор Fear_Is_An_Illusion, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +50
  • Проголосовать: не нравится

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

dreamoon_love_AA rating is on the slide again. I don't know but he seems pretty interested to go down in ratings when he reaches international grandmaster :|

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

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

Автор Fear_Is_An_Illusion, 9 лет назад, По-английски
Теги c++
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

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

I think MSN will blast through Real Madrid's defence. So Barcelona for me. What do you all think ?

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

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

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

Hi all. I was thinking if CodeForces created a new feature which would enable to hack the code of my *true friends irrespective of their room. Would be so much fun.

*True Friends are those coders who are in your friend list and you are in theirs.

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

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

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

So SPOJ upgraded their UI. It looks nice. But I really miss the old look and feel.

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

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

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

Hello, this is a post for beginners. Recently I came across a blog of someone asking a very basic simple explanation. I will try my best to explain DFS in as a simple a way as possible. Note, If you know DFS, don't read any further.

DFS (Depth First Search) is an algorithm used to traverse graph or tree. We first select the root node of a tree, or any random node(in case of graph) and explore as far as possible in a branch and then come back to a fixed point. DFS is generally used for connectivity questions. It has a time complexity of O(N+E) Where N is the total number of nodes and E is the total number of edges.

Let's take this graph. Here A is connected to E,B,D ; B is connected with A,D,C ; C is connected with B ; D is connected with A,B and E is connected with A ; F is not connected.

We represent this graph using an Adjacency List. Here is the code (in Python)

graph={ 'A':['E','B','D'],
        'B':['A','D','C'],
        'C':['B'],
        'D':['A','B'],
        'E':['A']}

Once we have the list, we perform DFS. Basically, we pick a node. Then we keep track if we have visited the nodes directly and indirectly connected to it. Since we are traversing downwards, we use a stack and we'll use it's last in first out(LIFO) feature. We also keep a list of all the nodes we have visited since we have to visit each node only once. So we will add an node to the stack only if that node has not been visited. On visiting a particular node we remove it from the stack. Finally, we'll end up visiting all the nodes and then the stack will be empty. That will serve as the terminating condition.

Here are the steps to follow while performing DFS.

  • Select a node. Since we have selected the node, add it to the visited list.
  • Look at all the adjacent nodes. Add those nodes which have not been visited to the stack.
  • Then pop the top node and Follow the first two steps.

Now, let us pick any node (say A) and perform DFS.

  1. We have selected the node A. We now add A to the list of nodes we have visited(which is empty initially). The nodes directly connected to A are E,B,D. So since we havent visited those nodes, we add them to the stack s. Now s=[E,B,D] and visited=[A]
  2. We pop s, and we get D. Now D is connected directly with A,B. Since we have visited A, we dont add it. So now s=[E,B] and visited=[A,D].
  3. We pop s, and we get B. Now B is connected directly to A,D,C. Since we have visited A,D we dont add it. However as we have not visited C, we add it to stack s. So now s=[E,C] and visited=[A,D,B]
  4. We pop s, we get C. Since we have visited all nodes connected to C, we dont push anything to the stack s. So now s=[E] and visited=[A,D,B,C]
  5. We pop s, we get E. Since we have visited all nodes connected to E, we dont push anything to the stack s. So now s=[] and visited=[A,D,B,C,E]

Now the stack is empty, and the DFS has been completed. The answer lies in the order we visited in the visited list.

Sample iterative implementation.


graph={ 'A':['E','B','D'], 'B':['A','D','C'], 'C':['B'], 'D':['A','B'], 'E':['A']} def dfs(graph,s): stack=[] visited=[] stack=[s] while stack: node=stack.pop() if node not in visited: visited.append(node) stack=stack+graph[node] return visited

Hope this helps you.

Thanks for your attention :) :)

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

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