Assignment 0
Assignment 0
Assignment 0
Deadline: 11:59 pm. August 6, 2023
Important Points:
1. Only C++ is allowed.
2. Directory Structure:
2023201001_A0
|_____2023201001_A0_Q1.cpp
|_____2023201001_A0_Q2.cpp
Replace your roll number in place of 2023201001
3. Submission Format: Follow the above mentioned directory structure and
zip the RollNo_A0 folder and submit RollNo_A0.zip on Moodle.
Note: All submissions which are not in the specified format or submitted
after the deadline will be awarded 0 in the assignment.
4. C++ STL is not allowed for any of the questions unless specified
otherwise in the question. So “#include <bits/stdc++.h>” is not allowed.
5. You can ask queries by posting on Moodle.
Problem Constraints:
1 <= T <= 10
3 <= n <= 105
Where T is the number of testcases.
All characters are lowercase alphabets.
Input Format:
The first line contains an integer T denoting the number of testcases.
The remaining T lines contain 2 space-separated strings.
Output Format:
Print "YES” or “NO” for each pair.
Problem Constraints:
1 <= N <= 106
0 <= S < N
0 <= J.length <= 106
0 <= J[I] <= 109
Input Format:
The first line contains an integer N denoting the size of circular array,
integer S denoting the starting index of frog and integer J denoting the
size of jumps array.
The second line contains N elements for the array.
The third line contains J elements for the jumps array.
Output Format:
Print J + 1 numbers which will be the value of element of array on which
frog has landed