Skip to content

A Kata created by me! I was curious to see how the Kattis engine works so I wrote my own problem package. Give it a go!

Notifications You must be signed in to change notification settings

alex-redfearn/two-dart-checkouts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

two-dart-checkouts

A Kata created by me! I was curious to see how the kattis engine worked so I created my own problem package! Kattis stores problems as problem packages, problem packages contain a description of the problem, sample input, sample output, test cases, and the submissions. Below you'll find all of that and an explanation on how to run the kattis engine and mount this problem package into it.

Problem

Alex wants to get better at darts. He's great at hitting trebles but not so great at hitting doubles or doing quick maths. From a starting point of 501 he can reliably get down to a score of under 99. He can hit a treble with one dart but he needs two attempts at the double. Since Alex is bad at maths he needs help to work out which treble and then double he needs to hit with his remaining three darts.

Input

The input will include one integer between 98 and 60.

Output

The output should include all possible two dart finishes for that number. Trebles should be prefixed with T and doubles with D.

Sample Input

86

Sample Output

T20 D10
T18 D16
T16 D19

Test Cases

Test cases are held inside the directory data/secret

Submissions

The submissions are held inside the submissions directory.

Evaluation

To get started, install the Docker CLI, and then pull the image:

docker pull problemtools/full

Problem tools is the engine that evaluates kata's, you can find the repo here https://github.com/Kattis/problemtools. Once the image has finished downloading, you can check that it exists on your system using docker images. To launch an interactive container run:

docker run --rm -it problemtools/full

To run this problem package, you'll need to clone this repo and launch an interactive container with a bind mount to your local clone.

docker run --rm -it -v "$(pwd)"/two-dart-checkouts:/two-dart-checkouts problemtools/full

To evaluate the submissions contained within this problem package, on the container run:

verifyproblem /two-dart-checkout

About

A Kata created by me! I was curious to see how the Kattis engine works so I wrote my own problem package. Give it a go!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published