I know we all miss the old rating calculation formula

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

# | User | Rating |
---|---|---|

1 | MiFaFaOvO | 3681 |

2 | tourist | 3567 |

3 | Um_nik | 3527 |

4 | ecnerwala | 3458 |

5 | maroonrk | 3409 |

6 | 300iq | 3317 |

7 | Petr | 3272 |

8 | LHiC | 3229 |

9 | Benq | 3226 |

10 | TLE | 3223 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 197 |

2 | antontrygubO_o | 188 |

3 | pikmike | 183 |

4 | Ashishgup | 182 |

5 | vovuh | 179 |

6 | Radewoosh | 167 |

7 | Um_nik | 165 |

8 | tourist | 163 |

9 | McDic | 162 |

10 | Geothermal | 157 |

I know we all miss the old rating calculation formula

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 without error (submitted before)

please see Antoniuk profile

pattern is fixed

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 ?

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

sorry for wasting your time

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

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

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

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

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

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

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

Advice is welcome :)

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

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

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

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.

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

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.

- 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]`

- 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]`

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

- 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]`

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

I had very bad contest yesterday.

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/02/2020 10:19:31 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|