Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Codeforces Pleasant Pairs | Codeforces | Python Solution

  • Decoder
  • 2021-06-25
  • 111
Codeforces Pleasant Pairs | Codeforces | Python Solution
Codeforces Pleasant PairsCodeforcesPython SolutionPleasant Pairs
  • ok logo

Скачать Codeforces Pleasant Pairs | Codeforces | Python Solution бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Codeforces Pleasant Pairs | Codeforces | Python Solution или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Codeforces Pleasant Pairs | Codeforces | Python Solution бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Codeforces Pleasant Pairs | Codeforces | Python Solution

#codeforces #PleasantPairs #AlbertLectures #CodingSolution

B. Pleasant Pairs

You are given an array a1,a2,…,an consisting of n distinct integers. Count the number of pairs of indices (i,j) such that i is less than j and ai*aj=i+j.

Input
The first line contains one integer t [1,10^4] — the number of test cases. Then t cases follow.

The first line of each test case contains one integer n [2,10^5] — the length of array a.

The second line of each test case contains n space separated integers a1,a2,…,an , ai = [1,2*n] — the array a. It is guaranteed that all elements are distinct.

It is guaranteed that the sum of n over all test cases does not exceed 2⋅105.

Output
For each test case, output the number of pairs of indices (i,j) such that i is less than j and ai*aj=i+j.

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]