Comments (4)
Pulled this from // TODO in solver:
name: "Array Jumping Game II",
numTries: 3,
solver: (data: number[], ans: string): boolean => {
const n: number = data.length;
let reach = 0;
let jumps = 0;
let lastJump = -1;
while (reach < n - 1) {
let jumpedFrom = -1;
for (let i = reach; i > lastJump; i--) {
if (i + data[i] > reach) {
reach = i + data[i];
jumpedFrom = i;
}
}
if (jumpedFrom === -1) {
jumps = 0;
break;
}
lastJump = jumpedFrom;
jumps++;
}
return jumps === parseInt(ans, 10);
},
},
from bitburner-scripts.
There's another one that is bugging me:
/Tasks/contractor.js.solver.js: Unable to find the answer for: {"contract":"contract-32543-FulcrumSecretTechnologies.cct","hostname":"syscore","type":"HammingCodes: Encoded Binary to Integer","data":"101111101110101100"}
Maybe a different story as this one will have another solution (and cannot be solved by hand as the array jumping game)
from bitburner-scripts.
Note that the "solvers" in source aren't actually solving the problem, just verifying the answer the player gives, so it's not "for free" to pull a solution from there.
It'll be a while before I add solvers for all the new coding contract types. Feel free to take a stab yourself!
from bitburner-scripts.
I'm working on the last if these now
from bitburner-scripts.
Related Issues (20)
- RAM usage error HOT 2
- Autopilot Warning/Error loops HOT 3
- Make work-for-factions.js display remaining time also considering sleeves. [enhancement] HOT 2
- Daemon settings(?) HOT 1
- Provide an option to sync player stats to an external location HOT 1
- suggestion: better progression understanding HOT 1
- autopilot stuck in constant reset HOT 4
- Git-Pull needs to use current working directory HOT 1
- faction-manager.js: Problem with rep cost estimates HOT 3
- faction-manager.js: Trying to join Netburners while not having to requirements
- Repeating warning with Bitburner v2.5.2 HOT 5
- Daemon.js: Non-integer thread count
- Bitbutner v2.6.0dev: Bladeburner skill cost of "null" breaks script
- Stanek's gift not activated automatically HOT 6
- daemon.js: Errors in late BN12.XXX when server initial values are outside of min/max values.
- Idea: utilize new IPvGO game for profit HOT 1
- Post Discord Invite link
- RAM Calculation Error in git-pull.js HOT 1
- Bladeburner.js incorrectly tries to do an action when there is less than 0 count remaining
- Bitburner now kills all scripts on casino save scumming. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitburner-scripts.