Find Jobs
Hire Freelancers

I'm finding experienced javascript developer.

$4-5 USD / hour

Imefungwa
Imechapishwa over 3 years ago

$4-5 USD / hour

This is fixed project. my budget is 5 usd. Hurdle Race Problem Description You are participating in an interesting hurdle race. The race comprises of stairs of certain heights and points at every meter that can be collected. Initially, you are at height 0. In order to make race interesting, an additional constraint is imposed in the race. You are given with certain indexes along with a minimum height you must be at when you reach that index. You are allowed to move forward if and only if you are at a minimum height specified at that index. Your task is to reach the end with the maximum amount of points. You are given with 2 arrays, points and height of size n each. Array points denote the points at n meters. Array height denotes the height of stairs at n meters. You are given with 2 more arrays, index and minheight of size m each. Array index denotes the index at which you must have a specific height to proceed ahead. Array minheight denote the minimum height that must be there to proceed ahead. At every index i, you can either pick the point[i] or climb the stairs and increase the height by height[i]. Your task is to tell the maximum points that can be collected when we reach the end. Output -1 if we can not reach the end of the race. INPUT FORMAT: The first line of input contains a single integer T denoting the number of test cases. The first line of each test case contains a single integer n. Next line contains n space-separated integers denoting points[i]. Next line contains n space-separated integers denoting height[i]. Next line contains a single integer m. Next line contains m space-separated integers denoting index[i]. Next line contains m space-separated integers denoting minheight[i]. OUTPUT FORMAT: Output a single integer denoting the maximum points that can be collected when we reach the end. CONSTRAINTS: 1 <= T <= 10 1 <= M <= N <= 1000 1 <= points[i] <= 10^5 1 <= height[i] <= 10^4 1 <= index[i] <= N-1 1 <= minheight[i] <= 10^4 SAMPLE INPUT #1: 1 4 1 4 3 2 4 0 2 3 2 1 2 3 2 SAMPLE OUTPUT #1: 9 SAMPLE EXPLANATION #1: TEST CASE #1: n=4, m=2, points=[1, 4, 3, 2], height=[4, 0, 2, 3], index=[1, 2], minheight=[3, 2]. At 0th meter, we will climb the stairs and increase our height by 4. Therefore, height = 4, points collected = 0. At 1st meter, we will collect the points. Therefore, height = 4, points collected = 4. Note, at index 1, we must have a height of 3, which is satisfied. At 2nd meter, we will collect the points. Therefore, height = 4, points collected = 7. Note, at index 2, we must have a height of 2, which is satisfied. At 3rd meter, we will collect the points. Therefore, height = 4, points collected = 9. Therefore, the final answer is 9. If you read whole description, please write down "I can do this within 5 usd." thanks
Kitambulisho cha mradi: 29255883

Kuhusu mradi

2 mapendekezo
Mradi wa mbali
Inatumika 3 yrs ago

Unatafuta kupata pesa?

Faida za kutoa zabuni kwenye Freelancer

Weka bajeti yako na muda uliopangwa
Pata malipo kwa kazi yako
Eleza pendekezo lako
Ni bure kujiandikisha na kutoa zabuni kwa kazi
2 wafanyakazi huru wana zabuni kwa wastani $5 USD/saa kwa kazi hii
Picha ya Mtumiaji
I can do this within 5 usd. Hi, there. Hope you are doing well. Reach out me on here so that and we can discuss in detail. Regards.
$5 USD ndani ya siku 40
0.0 (1 hakiki)
0.0
0.0
Picha ya Mtumiaji
Hi there, I have a great experience in web development and javascript, jquery and prototype. I will do this project for you at 4 dollars. Contact me in the chat so that I can start working on it. Regards, Amandeep Singh
$4 USD ndani ya siku 40
0.0 (0 hakiki)
0.0
0.0

Kuhusu mteja

Bedera ya LATVIA
Iecava, Latvia
5.0
1
Mwanachama tangu Jan 6, 2021

Uthibitishaji wa Mteja

Asante! Tumekutumia kiungo cha kudai mkopo wako bila malipo kwa barua pepe.
Hitilafu fulani imetokea wakati wa kutuma barua pepe yako. Tafadhali jaribu tena.
Watumiaji Waliosajiliwa Jumla ya Kazi Zilizochapishwa
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Onyesho la kukagua linapakia
Ruhusa imetolewa kwa Uwekaji wa Kijiografia.
Muda wako wa kuingia umeisha na umetoka nje. Tafadhali ingia tena.