| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1318420 | ramanji36 | Fish 3 (JOI24_fish3) | C++20 | 0 ms | 0 KiB |
simple the answer is in the range we will divide it by llike the d
two arrays
a[0]/d , a[1]/d , a[2]/d... ,a[n]/d -> v1
a[0]%mod , a[1]mod d , a[2]mod d... ,a[n]mod d -> v2
on more thing that about the fact that see if a[i]<=a[j] , either v1[i]<v1[j] if equal then v2[i]<=v2[j]
so for this we do is if v2[i]>v2[i+1] then we should add 1 to the v1[i]because then we can ensure the v1[i]<v1[i+1] so one more thing that we should add 1 to all the value to the left of i not only to the i vecause the diff between i and i-1 should not be affected by this
