You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes it's better to use dynamic size arrays. Java's Arraylist can provide you this feature. Try to solve this problem using Arraylist.
3
+
You are given nn lines. In each line there are zero or more integers. You need to answer a few queries where you need to tell the number located in ythyth position of xthxth line.
4
+
Take your input from System.in.
5
+
6
+
Input Format
7
+
The first line has an integer nn. In each of the next nn lines there will be an integer dd denoting number of integers on that line and then there will be dd space-separated integers. In the next line there will be an integer qq denoting number of queries. Each query will consist of two integers xx and yy.
8
+
9
+
Output Format
10
+
In each line, output the number located in ythyth position of xthxth line. If there is no such position, just print "ERROR!"
0 commit comments