Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

Fear_Is_An_Illusion's blog

By Fear_Is_An_Illusion, history, 4 years ago, In English,

I know we all miss the old rating calculation formula

Read more »

 
 
 
 
  • Vote: I like it
  • -23
  • Vote: I do not like it

By Fear_Is_An_Illusion, history, 5 years ago, In English,

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)

Read more »

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

By Fear_Is_An_Illusion, history, 5 years ago, In English,

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

Read more »

 
 
 
 
  • Vote: I like it
  • -31
  • Vote: I do not like it

By Fear_Is_An_Illusion, history, 5 years ago, In English,
 
 
 
 
  • Vote: I like it
  • +7
  • Vote: I do not like it

By Fear_Is_An_Illusion, history, 5 years ago, In English,

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

Read more »

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

By Fear_Is_An_Illusion, history, 5 years ago, In English,

please see Antoniuk profile

Read more »

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

By Fear_Is_An_Illusion, history, 5 years ago, In English,

pattern is fixed

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,

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

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By Fear_Is_An_Illusion, history, 5 years ago, In English,

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 ?

Read more »

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

By Fear_Is_An_Illusion, history, 5 years ago, In English,

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

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,

link

sorry for wasting your time

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,

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

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

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

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

Read more »

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

By Fear_Is_An_Illusion, history, 5 years ago, In English,

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

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By Fear_Is_An_Illusion, 5 years ago, In English,

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

Read more »

 
 
 
 
  • Vote: I like it
  • -24
  • Vote: I do not like it

By Fear_Is_An_Illusion, history, 5 years ago, In English,

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

Advice is welcome :)

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,

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

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,

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 heaton for the tip

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,
 
 
 
 
  • Vote: I like it
  • +50
  • Vote: I do not like it

By Fear_Is_An_Illusion, 5 years ago, In English,

dreamoon 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 :|

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,
Tags c++
 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By Fear_Is_An_Illusion, 5 years ago, In English,

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

Read more »

 
 
 
 
  • Vote: I like it
  • -53
  • Vote: I do not like it

By Fear_Is_An_Illusion, 5 years ago, In English,

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.

Read more »

 
 
 
 
  • Vote: I like it
  • -64
  • Vote: I do not like it

By Fear_Is_An_Illusion, 5 years ago, In English,

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

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,

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

Read more »

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

By Fear_Is_An_Illusion, 5 years ago, In English,

I had very bad contest yesterday.

Read more »

 
 
 
 
  • Vote: I like it
  • -31
  • Vote: I do not like it