Giter Club home page Giter Club logo

competitive-programming's Introduction

Competitive Programming Solutions

My solutions to over 350+ Competitive Programming (CP) Problems, drawn from:

For the uninitiated, CP Problems require you to write code to perform some computation on a range of test inputs and output the results. Submitting your Solution (constrained to a single source file) uploads it to the Online Judge, which automatically compiles it and feeds it the prepared test inputs. A Solution is given a perfect score only if each outputted result is correct, and (the tricky bit!) completes its processing within the allotted time (typically, 2 seconds per test input).

All but the most trivial Problems adhere to the following pattern: "there is an algorithm that solves the Problem that is simple but too slow, and to succeed you must create an algorithm that is (worst-case asymptotically) optimal." The difficulty of creating this algorithm ranges from "easy" to "very hard!" :)

All (non-Contest) Solutions in this repo received perfect scores. Most are reasonably well-written, with some having "Editorial"-style high level overviews (the asymptotically-optimal algorithms can be decidedly non-obvious). Many are ... not as high quality, though :)

Some were written during live contests, but the majority are Practice problems that can be done at your own pace.

This repo also contains some of my own problems, including ones that have been published (Chef and Gordon Ramsay 2 (née "Equilateral Treeangles"), Move the Coins 2! and Move the Coins - Creating Tests), and others that (sadly) ended up not being workable. Most also contain Testcase Generators (and shared helper utils), Problem Statements, Editorials, Python-based manim animations etc so you can see how much work goes into creating the things (2426 commits worth, apparently! ;))

The whole repo contains ~74k lines of C++ code (after stripping whitespace and comments), according to tokei.

competitive-programming's People

Contributors

ssj-gz avatar

Watchers

 avatar

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.