Diferente pentru problema/winetasting intre reviziile #3 si #5

Nu exista diferente intre titluri.

Diferente intre continut:

There are $N$ vineyards arranged in a row, numbered from $0$ to $N-1$. Giorgio starts the tour from vineyard $L$, once the first tasting is over he will move on to the vineyard $L+1$, then to the vineyard $L+2$ and so on until he reaches the vineyard $R$. Note that Giorgio can start and end his tour on the same vineyard.
To visit the vineyard $i$ Giorgio has to pay $V_i$ euro. The cost of a tour is the cost of each vineyard visited.
To visit the vineyard $i$ Giorgio has to pay $V[i]$ euro. The cost of a tour is the cost of each vineyard visited.
There are a total of $N*(N+1)/2$ different tours, Giorgio will choose one of the tours in the following way:
h2. Date de intrare
Fişierul de intrare $winetasting.in$ ...
The first line of the input file $winetasting.in$ contains the integers $N$ and $K$. The second line contains $N$ integers $V[i]$.
h2. Date de ieşire
În fişierul de ieşire $winetasting.out$ ...
The output file $winetasting.out$ contains a single line which has the integers $L$ and $R$: the first and the last vineyards of Giorgio's tour.
h2. Restricţii
* $... ≤ ... ≤ ...$
* $1 ≤ N ≤ 2*10^5$
* $1 ≤ K ≤ N*(N+1)/2$
* $1 ≤ v[i] ≤ 10^9$
* For tests worth $50$ points, $V[i]$ = $1$ for all values in the input.
* For tests worth $20$ more points, $1 ≤ N ≤ 1000$.
h2. Exemplu
table(example). |_. winetasting.in |_. winetasting.out |
| This is some
  text written on
  multiple lines.
| This is another
  text written on
  multiple lines.
| 4 4
1 2 3 1
| 0 1
|
 
table(example). |_. winetasting.in |_. winetasting.out |
| 6 18
1 2 1 2 1 2
| 2 5
|
h3. Explicaţie

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.