vigotech / reto Goto Github PK
View Code? Open in Web Editor NEWReto de programación mensual
Home Page: http://www.vigotech.org
License: BSD 3-Clause "New" or "Revised" License
Reto de programación mensual
Home Page: http://www.vigotech.org
License: BSD 3-Clause "New" or "Revised" License
Abro Issue porque estou liándoa parda intentando facer outro pull request só con cambios no README sen joder o que xa teño aberto para a solución. xD
A cousa é que a proba recomendada no README para o bonus opcional 2 creo que non é a máis doada para evaluar a capacidade da solución.
Básicamente, ti podes crear unha solución válida que antes de probar por forza bruta todas as posibles combinacións faga un par de "checkeos" rápidos coma:
Usando a segunda condición (que sería lóxico e lexítimo), a proba recomendada para o bonus 2 remata case instantáneamente e penso que pode levar confusión a hora de evaluar a capacidade do algoritmo no reto dos 300 segundos.
Propoño como proba para o bonus 2 o seguinte exemplo:
[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 55] - > true
Que non inclúe o número 0, evalúase a true, e penso que non é susceptible de resolverse con "checkeos rápidos".
Código exemplo de Python para generalo:
def get_case(N):
case = list(range(-N, 0))
case += [abs(sum(case))]
return case
E poderíase empregar incrementalmente igual que a que hai agora:
# get_case(11)
[-11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 66] -> true
# get_case(12)
[-12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 78] -> true
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.