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

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

I am trying to solve this problem: NEKAMELEONI I have read the tutorial but I can not understand what it says. Can anyone tell me more about this interesting problem? Thank in advance!

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

»
11 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +2 Проголосовать: не нравится

You are given an array with N integers ar ( for all i (1<=i<=N) 1<=ar[i]<=K ) and you have M task in each task you are given a x number . if x is 1 you are given 2 more numbers a and b it means you must change ar[a] into b if x is 2 you must find a subarray that contains all [1,K] numbers and it must be the shortest contiguous subarray and you must print its length if there is no subarray that contains all [1,K] numbers you must print "-1" (that is what i understand on the problem , it can be wrong) (sorry for bad english)

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

You have solution on this site https://www.hsin.hr/coci/