Speedbreaker

Правка en8, от Negationist, 2024-09-28 21:05:33

In the speedbreaker question, why do we need to do: c++ mn[i]=min(mn[i],mn[i-1]),mx[i]=max(mx[i],mx[i-1]);

I (mostly) get everything besides that. Thanks in advance!

Full submission by Zqr123456 on Div 2 contest:

“Code"

Also, I get why the first condition is necessary for there to be a solutions and I get why the second part of the code finds that good interval, but I'm having a little trouble piecing together the sufficiency of the two to guarantee the right answer. Perhaps this is also why I font understand why you have to do the operations on the mins and maxes too.

#include <iostream>
using namespace std;

int main () {
   cout << "Hello world!\n";
   return 0;
}

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en9 Английский Negationist 2024-09-28 21:06:53 857
en8 Английский Negationist 2024-09-28 21:05:33 148
en7 Английский Negationist 2024-09-28 21:04:57 5
en6 Английский Negationist 2024-09-28 21:01:38 16
en5 Английский Negationist 2024-09-28 21:00:18 27
en4 Английский Negationist 2024-09-28 19:53:20 13
en3 Английский Negationist 2024-09-28 19:51:35 40
en2 Английский Negationist 2024-09-28 10:39:09 30 Tiny change: 'submission: \n#inclu' -> 'submission by Zqr123456 on Div 2 contest: \n#inclu'
en1 Английский Negationist 2024-09-28 10:38:14 1139 Initial revision (published)