Блог пользователя fullbuster

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

Problem link http://codeforces.me/problemset/problem/359/D

Here is my solution for the problem http://codeforces.me/contest/359/submission/27581236 I first created lefty[i] and righty[i] which contains the left and right index of the farthest number such that all numbers between farthest number and number at index i are divisible by a[i] . I created it using sparse table . My solution is failing at testcase 25 can someone please help me to debug it.

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

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

27584809 Be careful about constraints next time :)

(log(n) is equal to 18, hence your sparse table fails).