Блог пользователя pas.andrei

Автор pas.andrei, история, 7 лет назад, По-английски

It appears that I can't see any profile picture on anyone's profile, except for my profile picture in the right side of the screen as you can see in the image below. Is it broken only for me?

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

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

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

I want to improve my problem-solving skills by resolving lots of ad-hoc problems, unfortunately on Codeforces there is no "ad-hoc" tag. If anyone here has a list with thinking problems, I'd be very thankful if you share it with me.

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

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

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

I am given a undirected (multi-)graph with N vertices and M edges. I have to find a cycle of minimum cost in this graph and then print the vertices in their traversal order. Also, I can't use the same edge twice.

In the following example the numbers on the first line represent N and M. On each of the following M lines there are 3 numbers: x, y and c, meaning that there is an undirected road between x and y with cost c.

5 7
1 4 1
1 3 300
3 1 10
1 2 16
2 3 100
2 5 15
5 3 20

Answer:
1 3 5 2 1

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

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

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

I am trying to solve this problem in which I am given a number n, representing the number of vertexes in a undirected graph. On the next line there are n natural numbers representing the degree of the respective vertex. I am asked to find the edges, such that the graph is connected.

n<=5000 and it is forbbiden that two or more edges connect the same two vertexes.

LE: Also, there will always exist a graph with the degrees given in the tests.

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

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

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

Given an array (multiset) of N elements, find the maximum number of subsets such that the sum of elements in each of the subsets is different and smaller than k.

Example: N = 4 a = {1, 1, 3, 5}

Out of all the 2^4 possible subsets of array a, 11 of them (including empty subset) have distinct sums.

Restricions: 1 <= N <= 1000 1 <= a[i] <= 50000 1 <= k <= 50000 Time limit: 0.4s Memory limit 16 MB

It is tagged as Dynamic Programming problem on the site I took it but I couldn't find any recursive formula in 2 days, so I thought that you can help me.

EDIT: I finally came up with a solution, which I'd rather classify as BFS.

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

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

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

When i try to login on topcoder website i keep getting the following warrning

Link to the bigger picture

Is anyone else getting the same thing? Can anyone please help me fix this problem?

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

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

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

I was trying to solve this problem, but I kept getting "Runtime error on test 1" until I changed the code a bit:

This into this. Can someone tell me why I got RTE before?

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

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

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

I want to order this book, but i couldn't find the table of contents for the full version. Can anybody who owns it tell me what it contains and if it could help someone with my rating improve at algorthmical thinking?

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

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