A small, fast codeforces command line tool for competitive programming.

Overview

chainsaw: A Codeforces Commandline Tool

chainsaw is a small and faster drop-in replacement for your copy and paste while attending Codeforces contests. chainsaw is created for increasing competitive programmer productivity by reducing run sample test time especially in real-time contests and the sites kind of lagging due to the traffic.

Why does the speed matter?

No matter you are a competitive programmer or a hobby coder, while attending a contest, you always want things to be as convenient as possible. A contest consists of three phases. In the first phase, you create all your *.cpp or any other language file. In the second phase, you write algorithms to solve that specific problem. In the third phase, you compile your program and run all sample tests from website to check whether your code is correct.

The first phase and third phase are just repetitive copy and paste work, but it will waste a lot of time if you just do it by your self, and a little bit annoying. chainsaw can make it automatically, and much faster, saving your time and keeping you from being distracted while copy the test file from website and re-compile your program and check whether it is correct. The difference is most noticeable when you are in rapid fix/debug-edit-recompile cycles.

Install

chainsaw is written in C++17, so if you want to install chainsaw on your machine. you need a very recent version of GCC or Clang. I'm using macOS Monterey 12.1 as a development platform, I'm also testing that in Ubuntu 20.04 LTS, it can also install successfully. In that two environment, you can install chainsaw by the following commands:

Ubuntu 20.04 and later / macOS Monterey 12.1 and later

git clone https://github.com/Angold-4/chainsaw.git

cd chainsaw

./install.sh

If no error reported, then restart your shell, now you can run chainsaw on your command line.

chainsaw

By default, chainsaw is installed to /usr/local/bin

How to use

A classic way to use chainsaw
  1. When the contest start
    run chainsaw gen CNUMBER (i.e. 1616) to generate all problems file and sample tests.

gen

  1. After finishing your problem
    run chainsaw runsamples PNUMBER (i.e. H) to compile your code and check whether it is correct.

runsamples

Why is chainsaw so fast?

One reason is because it simply uses faster algorithms and efficient data structures. The other reason is that the sample tests generator is highly parallelized.

I using curl, a very simple C++ Library to fetch all html files, and using pthread to parallize the http Request, which means you can fetch 8 problems's html file just by costing one http request time.

In my machine, the chainsaw gen command only costs 4 seconds for any kinds of contests in Codeforces, which is superfast.

Logo

chainsaw image

You might also like...
A One Stop Place to find many useful Snippets for competitive programming

CP_Snippets A One Stop Place to find many useful Snippets for competetive programming Contribution Procedure Raise an issue about the snippet you want

A repo for helping people get started with Competitive Programming and Data Structures & Algorithms

Hack CP DSA Update regarding hacktoberfest: please refer this announcement Wanna improve your problem solving skills ❓ Wanna practice collaborating on

The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.

Wren is a small, fast, class-based concurrent scripting language Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in a fami

A small and fast programming language.
A small and fast programming language.

Pocketlang is a small (~3000 semicolons) and fast functional language written in C. It's syntactically similar to Ruby and it can be learned within 15

Lightweight C++ command line option parser

Release versions Note that master is generally a work in progress, and you probably want to use a tagged release version. Version 3 breaking changes I

The command line interface for Piccolo
The command line interface for Piccolo

Piccolo programming language A fun, easy to embed high-level programming language. This repo contains the code for the Piccolo CLI. The core Piccolo c

A simple DPDK application that calculates stats for dropped and forwarded packets depending on the command line.

The DPDK Stats Description A small DPDK application that increments a basic packet counter for TCP or UDP packets depending on what's specified in the

Simple command-line program for sharing the display image on a local network.

XCast is a simple server/client command line program for sharing screen under X. With XCast you have the ability to either pull the display from a rem

LKM Command Line Parsing - Parte 2
LKM Command Line Parsing - Parte 2

LKM-Command-Line-Parsing 👾 Hoje iremos falar sobre Command Line Parsing diretamente no LKM. Esse é a segunda parte da nossa série de estudos para Roo

Owner
Jiawei Wang
Founder of @Angorithm4
Jiawei Wang
Contains Algorithms and Competitive Programming sites solutions (codeforces, codechef, etc.)

✨ hacktoberfest2021 ?? ?? Contributing to hacktoberfest 2021 Welcome to hacktoberfest 2021 Public Repository. ????‍?? A month-long celebration from Oc

null 13 Oct 22, 2022
This repo contains solutions to coding questions available online on coding platforms like - Codeforces, Codechef, URI Online Judge, and Hackerrank.

CPP_Soln This repo contains solutions to coding questions available online on coding platforms like - Codeforces, Codechef, URI Online Judge , LeetCod

Rijul Jain 4 Nov 3, 2022
This repository shows my all (maybe all) solved problem (CodeForces & AtCoder) and their description with my Codes!!!

Submissions Auto-generated with ❤ using Harwest Introduction A repository to keep track of problem solving practice, containing solutions from platfor

Obaydullah Khan  3 Aug 4, 2022
Icopack - A simple command line tool to create multi-frame ICO files from PNG source images

Optidash is a modern, AI-powered image optimization and processing API. We will drastically speed-up your websites and save you money on bandwidth and

Optidash AI 61 Jul 27, 2022
Wave Function Collapse library in C, plus a command-line tool

wfc Single-file Wave Function Collapse library in C, plus a command-line tool License: MIT Version: 0.01 This is an early version that supports the ov

krychu 314 Dec 29, 2022
Command line tool for offline shader ISA inspection.

Intel Shader Analyzer Intel Shader Analyzer is a tool for offline static analysis of shaders for Intel GPU Architectures. It allows a user to compile

null 113 Jan 3, 2023
OS X command line tool to inject Frameworks and dylibs on mach-o binaries (iOS & Mac Apps).

macho-inject OS X command line tool to inject Frameworks and dylibs on mach-o binaries. It does the injection of the framework and the codesigning. It

Jon Gabilondo 6 Nov 8, 2022
fx is a workspace tool manager. It allows you to create consistent, discoverable, language-neutral and developer friendly command line tools.

fx is a workspace tool manager. It allows you to create consistent, discoverable, language-neutral and developer friendly command line tools.

null 19 Aug 27, 2022
Competitive Programming Implementations, Resources, Solutions, and Tools

In competitive programming contests, one must write computer programs capable of solving clear-cut problems under the given contraints and limits. Most competitive programmers use C++, Java, or Python.

Dong Liu 14 Sep 23, 2021
Officially repository Competitive Programming ID

Competitive Programming ID Official repository of Competitive Programming ID (https://t.me/CP_ID) Codewars Stats -------------------------------------

DVL ナンダ 3 Nov 27, 2022