General Information

The following is important information about the 2020 University of Arkansas High School Programming Contest.

 

DATE – Saturday, March 14th

The 2020 contest will be held on Saturday, March 14th. Details will be forthcoming soon.

Contest Environment

In recent years, our contests have been conducted using the Linux operating system, with teams typically using Vim or gVim (https://www.vim.org/) or gedit (https://wiki.gnome.org/Apps/Gedit) to write their solution programs. gVim is a popular GUI version of the Vim text editor, and Vim is easily one of the most widely available and standard editors in Linux (and is available on other OSs). Similarly, gedit is the default editor for the GNOME desktop environment, which is among the most widely used desktop choices for Linux.

The gVim editor is easy enough to use that no prior instruction is needed, however, it is also a very powerful editor for writing programs and experienced users can greatly increase their productivity with a thorough understanding before arriving at the contest. Windows, OS X and Linux versions of Vim and gvim may be downloaded at http://www.vim.org/ so that teams may familiarize themselves with the editor. The default option for starting gVim AT the contest will be the “easy mode” which means the editor will nominally behave as a point-and-click editor. If you wish to use the more powerful capabilities of gvim (or vim itself), please alert the contest staff.

Ahead of the contest teams can (and should) also practice in a Linux-like environment, which you can create by installing on Windows or Mac OS X system, a virtual machine. We recommend using VirtualBox, a virtual machine environment (hypervisor), within which you would install Ubuntu or Linux Mint.

Programs may be written in the following languages:

  • C
  • C++
  • Java

Other languages may be accommodated depending on suitability and if the coordinating staff can set this up with adequate time for testing. If there is a language you would like to add to the above list, please contact Dr. Wing Ning Li clearly stating that you wish to use the language in the high school programming contest. We will make our best effort to accomodate you, but no promises.

Contest and Problem structure

Problems will come in pairs. The odd-numbered problems will be easier than the even-number problems in that each even-numbered problem will add some complication to the previous odd-numbered problem.

There will be eight problems total.

Programs will be tested on a variety of input instances in a file and must give a successful answer on each instance. Upon program failure, the submitting team will be given the particular input instance on which the program failed so that they may make corrections and submit again. For each problem, each team may receive upto five failed input instances. No more failed input instance will be given once such a limit is reached.

Teams will be ranked as follows:

Teams are ranked according to the most problems solved. For the purpose of breaking the tie, teams that solve the same number of problems are ranked by least total time. The total time is defined as the sum of the time consumed for each problem solved. The time consumed for a problem solved is defined as the time elapsed from the beginning of the contest to the submittal of the accepted run plus 20 penalty mimutes for every rejected run for that problem regardless of submittal time. There is no time consumed for a problem that is not solved.

In the case of further ties for least total time, teams will have the same rank and receive the same award. Let us consider an example of total time. Suppose the contest begins at 10. Team A submits the accepted run the first time at 11 for one problem. The time consumed for this problem is 60 minutes. Team A submits the rejected run at 11:30 and 11:45 before submitting the accepted run for another problem at 12. The time consumed for this problem is 120+20+20 = 160 minutes. If team A does not have any additional problem accepted for the contest, the team A solves 2 problems with total time of 60+160=220 minutes.

All problems will require that input be read from the terminal or console (known as stdin on Linux Systems) and produce output to the terminal or console (known as stdout on Linux systems). Therefore, in a problem description a line refers to a line from or to the console. Printing to the console involves the System.out.println , printf , and cout functions for Java, C, and C++ respectively.

Program Compilation and Execution

Teams will manually compile and test their programs. Each team may name the source file for problem1 as problem1.java, problem1.cpp, problem1.c for Java, C++, and C programming languages respectively. All source for each submission must be within a single file. For the following examples, we suppose the Java, C, and C++ programmers name their files problem1.java , problem1.c , and problem1.cpp , respectively.

Java programmers

For Java programmers, the program entry point must be defined within the Main class. Java compilers often demand that any public class X should be defined in file X.java . You can avoid this by not declaring each class public. For example, define your source similar to this template…

          class Main
          {
          // this is the entry point
          public static void main(String[] args)
          {
          }
          }

          // other classes can be defined so long as they are not public
          class SomeOtherClass
          {
          }
        

…and then compiling with the command…

          javac problem1.java
        

…at the system prompt would compile the source code in problem1.java and produce the file Main.class. To run the program on a data file test1A, the programmers would issue the command…

          java Main < test1A
        

…at the system prompt.

C programmers

For C programmers, issuing the command…

          gcc -o problem1 -Wall problem1.c
        

…at the system prompt would compile the source code in problem1.c and produce the executable file problem1. To run the program on a data file test1A, the programmers would issue the command…

          ./problem1 < test1A
        

…at the system prompt.

C++ programmers

For C++ programmers, issuing the command…

          g++ -o problem1 -Wall problem1.cpp
        

at the system prompt would compile the source code in problem1.cpp and produce the executable file problem1. To run their program on a data file named test1A, the programmers would issue the command…

          ./problem1 < test1A
        

…at the system prompt.