Skip to content

cshuaimin/uva

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A productive cli tool to enjoy UVa Online Judge!

A very effficient way to fight questions:

  • Print the problem description in terminal with a format like man(1).
  • Compile and test the code locally, using test cases from udebug.com.
  • Use a special diff algorithm to compare the output with the answer.
  • Finally, you can submit the code to online judge and get result.

Screenshot

asciicast

Installation

Install prebuilt packages

  1. Download prebuilt binary from releases page.
  2. Open/extract the archive.
  3. Move uva to your path (/usr/local/bin for example).
  4. (macOS) Install pdftotext cli: brew install poppler

Build from source

$ go install github.com/cshuaimin/uva@latest

Usage

$ uva -h
NAME:
   uva - A cli tool to enjoy uva oj!

USAGE:                                                                                                                                 
   uva [command]

VERSION:
   0.3.0

COMMANDS:
     user     manage account
     show     show problem by id
     touch    create source file
     submit   submit code
     test     test code locally
     dump     dump test cases to files
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version
$ uva test -h                      
NAME:
   uva test - test code locally

USAGE:
   uva test FILE
   uva test 10041.happy.cpp

OPTIONS:
   -i value  input file
   -a value  answer file
   -b        compare each line of output with the answer byte-by-byte