Find Jobs
Hire Freelancers

I'm finding experienced javascript developer.

$4-5 USD / hour

Fechado
Publicado há aproximadamente 3 anos

$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
ID do Projeto: 29255883

Sobre o projeto

2 propostas
Projeto remoto
Ativo há 3 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
2 freelancers estão ofertando em média $5 USD/hora for esse trabalho
Avatar do Usuário
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 em 40 dias
0,0 (1 avaliação)
0,0
0,0
Avatar do Usuário
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 em 40 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) LATVIA
Iecava, Latvia
5,0
1
Membro desde jan. 6, 2021

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.