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

Автор pratikshaw, история, 10 месяцев назад, По-английски

Problem link : https://cses.fi/problemset/task/1194 Submission link: https://cses.fi/problemset/result/6625261/

I have done the problem in n*m which is the most optimised one, (1<=n,m<=10^3) . Even then I am getting TLE in one test case

Полный текст и комментарии »

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

Автор pratikshaw, история, 10 месяцев назад, По-английски

You are given an array of size n, consisting of non negative integers. Find the number of subarrays of arr which are special. A subarray is special if it satisfies the following condition: The product of the maximum and the minimum element of the subarray is divisible by the length of the subarray. Find the number of special subarrays of the array.

1<=n<=1e5

Полный текст и комментарии »

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