Answered step by step
Verified Expert Solution
Question
1 Approved Answer
User Question 8 0 Max. score: 2 0 . 0 0 URL Checking URL Checking Given a URL, you have to write the main URL
User
Question
Max. score:
URL Checking
URL Checking
Given a URL, you have to write the main URL and the parameters passed in the form of a report check the example Also, the reference values of all parameters are given. You have to check if the values of all parameters are less than or equal to the values given. If so then print at the end of the report, else print
Note:
The parameters list in the reference values can have more parameters than the ones present in the URL. But it is guaranteed that all parameters in the URL are present in the list.
The base url and the parameters are separated by a
Different paramaters are separated by a
Task
Generate a report on the URL given.
Example
Assumptions
url https:leetcodecomproblemsetallpage
N
params pagedifficulty
val
Output
https:leetcodecomproblemsetall
page
Approach
The main url is https:leetcodecomproblemsetall there is only parameter page with value Hence, the parameters are Ok so we print
Input format
Note: This is the input format that you must use to provide custom input available above the Compile and Test button
The first line contains the URL
The second line contains N the number of parameters.
The third line contains N spaceseparated strings denoting the parameters.
The fourth line contains N spaceseparated integers denoting the reference values of the parameters.
Output format
Print the answer in the given format.
The first line contains the main URL.
The second line contains M the number of parameters.
Then M lines follow. Each line contains a string, the parameter and a value of the parameter. Print the parameters in sorted order.
The last line contains the status.
Constraints
Sample input
https:leetcodecomproblemsetallpage
page difficulty
Sample output
https:leetcodecomproblemsetall
page
Explanation
Given in statement
The following test cases are the actual test cases of this question that may be used to evaluate your submission.
Sample input
wwwwmjnxjvhncom?juvbcuesbp
juvbc uesbp oetwuq sfbsqk elvfka aoxdqc dstgyt ppredp peamvu pswffa
Sample output
wwwwmjnxjvhncom
juvbc
uesbp
Sample input
wwwvjvjgcnmwnthcfthhopcxjgkumlhnkswfniliqbqgtvhykiwnyhcspwhlrrykquwkqvxldeqcmsjfrcxingterkukkffrkhpqrmbtyypodnphjvjrjnoyighynjxicscarfktarelgcifubtludiosoemldsordmmpkxfhamxvcwexnoyfpnyyeamvrtsbgxorylfdwdrpcxebqdtnjsusyhruxivbhfvamluhiwctfgjuieoshsilyrslfqfkecfaspniyfcrkwwnlgauxaeueejjjloaxfbtkbrnoqqftwyyvldkopdkflneysnarkthjjpyacihxkoidrirkbvlgiyykexbovdsybijqrkyklgrghuneagvoaxcjsgrrvolubhjdkswdekqseuaolxkfglsocvrqjakftqiqneglrndmruecbabiyvjefbqwtuskrginwavrsarcjrrqmwhcnyqnfuxhqvudcpslpbyntbhbupoiccdlycqydbdnumswooyvljjbsisvbgsihdgcddprqeyhxyyiwcwprf
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started