GokuSSJ7's blog

By GokuSSJ7, history, 5 years ago, In English

Given a scalar graph of n vertices and n-1 edges. Any two vertices can reach each other through the edges. For each vertex i, find the shortest length from vertex 1 to all vertices divided by vertex i and then return to vertex 1 (with 1 <= i <= n) . (n<=100000)

Full text and comments »

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

By GokuSSJ7, history, 5 years ago, In English

for a sequence of positive integers a1, a2, a3, ..., an and a number d. You can select a consecutive sub-segment in the sequence a1, a2, a3, ..., an and increase that sub-segment to x (-d <= x <= d).What is the longest increase in a substring length you have? (With n <= 100000 and d <= 1000000000 and a[i]<=1000000000 with from 1 to n) (Since this is my school essay, I don't have any links, so sorry).

Full text and comments »

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

By GokuSSJ7, history, 5 years ago, In English

Hello Codeforces; I need help with the following problem : For the sequence a[1], a[2], a[3], ..., a [n] increase gradually. Prove that when x=a[n/2+1], the function f(x)=abs(a[1]-x) + abs (a[2]-x) + ... + abs(a[n]-x) has the smallest value. Thanks you !

Full text and comments »

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