RUVIDEO
Поделитесь видео 🙏

Variable sized array hackerrank - arrays of array, using vectors an easy solution c++ смотреть онлайн

Problem link : https://www.hackerrank.com/challenges/variable-sized-arrays/problem

Hi, thanks for watching our video about vectors in C++
In this video we’ll walk you through:
- vectors
- Array of arrays
- Solution

TIMESTAMPS
0:00 Intro
1:15 Explanation begins
20:25 IDE solution

ABOUT OUR CHANNEL
Our channel is all about Programming. We cover lots of cool stuff such as solution to problems, concept explanation and tricks to master CP
Check out our channel here:
https://www.youtube.com/channel/UCqtYay7YwH8JdZxDqpVEPvg
Don’t forget to subscribe!

CHECK OUT OUR OTHER Playlists

GeeksforGeeks playlist:
https://youtube.com/playlist?list=PLDaU_TBYXoirv-848r81oHLSArcBrjIe7

Complete C++ Course playlist:
https://youtube.com/playlist?list=PLDaU_TBYXoio9L1qRpTrtzK9JJAwFLMSj

CodeChef Playlist:
https://youtube.com/playlist?list=PLDaU_TBYXoip_JFIo0U-Nl2dNA_ZMsd2z

LeetCode problems
https://youtube.com/playlist?list=PLDaU_TBYXoirsirbg6feNCKk3oPRn6M7w

HackerRank playlist:
https://youtube.com/playlist?list=PLDaU_TBYXoirMjgzW59T_XMyT5yRZ7ht_

FIND US AT
https://www.waadanibhao.wordpress.com

GET IN TOUCH
Contact us on [email protected]


Consider an n-element array a, where each index i in the array contains a reference to an array of integers (where the value of varies from array to array). See the Explanation section below for a diagram.

Given a, you must answer q queries. Each query is in the format i j, where i denotes an index in array a and j denotes an index in the array located at a[i]. For each query, find and print the value of element in the array at location on a new line.

Click here to know more about how to create variable sized arrays in C++.

Input Format

The first line contains two space-separated integers denoting the respective values of n(the number of variable-length arrays) and q(the number of queries).
Each line i of the n subsequent lines contains a space-separated sequence in the format k a[i]0 a[i]1 … a[i]k-1 describing the k-element array located at a[i].
Each of the q subsequent lines contains two space-separated integers describing the respective values of i (an index in array a) and j (an index in the array referenced by a[i]) for a query.

Constraints

All indices in this challenge are zero-based.
All the given numbers are non negative and are not greater than
Output Format

For each pair of i and j values (i.e., for each query), print a single integer that denotes the element located at index of the array referenced by a[i]. There should be a total of q lines of output.

Sample Input

2 2
3 1 5 4
5 1 2 8 9 3
0 1
1 3
Sample Output

5
9
Explanation

The diagram below depicts our assembled Sample Input:

We perform the following queries:

Find the array located at index i=0, which corresponds to a[0]={1,5,4}. We must print the value at index j=1 of this array which, as you can see, is 5.
Find the array located at index i=1, which corresponds to a[1]={1,2,8,9,3}. We must print the value at index j=3 of this array which, as you can see, is 9.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Variable sized array hackerrank - arrays of array, using vectors an easy solution c++» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.