Git Product home page Git Product logo

kth-kattis-rust's Introduction

kth-kattis-rust

Checklist code to show that the rust programming language is viable for the Kattis code checker.

Submissions that do the following:

  1. Hello world
  2. Hello world implemented in at least 2 files
  3. stack-based MLE (Memory Limit Exceeded - Stack overflow)
  4. heap-based MLE (Memory Limit Exceeded)
  5. CE (Compile error)
  6. Try to open and print out /etc/passwd
  7. Any interesting RTEs that should be reported back specifically to the (RTE = Run Time Error) user as extrainfo. Three examples are given, they should probably all be reported simply as "program panicked" to the user.
  8. Some other RTE
  9. TLE (Time limit exceeded)
  10. AC solution to different (AC = Accepted)

How submission are tested

Each subdirectory of this directory is a problem with one submission. The files in each such directory are:

  • src is a directory that contains the actual submitted file(s). Often just a single main.rs, but there can be multiple files.
  • in and correct specifies the problem.

To compile and run the submission for a problem, cd to that problem directory and run:

../test.sh

After running, the directory will also contain:

  • bin/submission is the compiled submission.
  • out contains the output from running the submitted program.

The script test.sh in this directory builds and tests a submission. It compiles the submission, sets a few limits and then runs the submission, comparing the output to the correct output.

Note that source files other than main.rs does not have to mentioned on the command line (or in Cargo.toml if cargo is used).

The return code will be zero for a correct solution or non-zero for incorrect solutions (compiler errors or incorrect output). Any compiler errors / warnings or difference in output will be on standard output.

Cargo

The above mentioned test.sh works with raw rustc. Thus the stadard library but no other librararies can be used by submissions.

The Rust standard library is intentionally minimal. To make selected libraries (e.g. regex) availiable for use in submissions, a test script like test-with-cargo.sh can be used.

kth-kattis-rust's People

Contributors

kaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

vicfred

kth-kattis-rust's Issues

How to suggest Rust to be added in Kattis

What is the best way to make Rust an accepted language in Kattis a reality, is there an forum for discussion/suggestions?

I'd really love seeing Rust in Kattis for 2017 Programmerings Olympiaden and other competitions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.