amankbps's blog

By amankbps, history, 11 months ago, In English

You are given an array of n integers. Your task is to calculate the bitwise or of each window of k elements, from left to right. In this problem the input data is large and it is created using a generator. Input The first line contains two integers n and k: the number of elements and the size of the window. The next line contains four integers x, a, b and c: the input generator parameters. The input is generated as follows:

problem link

how to solve this efficiently i got tle when i try to solve n*31

Full text and comments »

  • Vote: I like it
  • +9
  • Vote: I do not like it

By amankbps, history, 2 years ago, In English

Is their any way to convert lps array to z array

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By amankbps, history, 3 years ago, In English

I want to solve this problem https://mirror.codeforces.com/contest/1029/problem/A but unable to implement that finding the period of substring in string if someone share approach it will great help

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it