Useful Information

Mid-Central North America Regional 

This page contains information for Contestants, Coaches, and Site Directors.

Contestants

Scoring

Teams are ranked by the number of problems solved, with teams solving the same number of problems ranked by least total time. Teams solving the same number of problems with the same total time are ranked by the smallest elapsed time of their last accepted solution (not counting penalties for rejected runs). See the official ICPC Regional Rules for more details.

Any ties that remain, even after applying the official rules, are left unbroken unless they affect the regional winners, in which case they are broken by a coin flip.

Disqualification

Any team that jeopardizes the integrity of the contest or violates the rules of the contest will be disqualified and the team members may be banned permanently from competing in the Mid-Central Region. Some examples of such actions are:

  • accessing the Internet in any way other than those specifically allowed (such as Kattis),
  • disrupting power to computers,
  • corrupting judging materials or the judging process,
  • collaborating with anyone not on the team (this includes using a portable phone),
  • disobeying site officials’ instructions regarding appropriate conduct.
Using Kattis

Here is a youtube tutorial on Kattis: https://www.youtube.com/watch?v=7NHyzBN4GAM

Your site will provide you with login credentials and the Kattis competition web URL. You must write your code in Java, C++, C, Kotlin, Python 3, or Javascript and submit the code to Kattis. Kattis will then compile your code and run it on some secret input. After some careful deliberation, you will get a judgement informing you whether your code behaved as expected or not.

Finding problems and sample data

You will find the problems both in the Kattis web page under the heading PROBLEMS and on paper copies provided to you at your site. The end of the online version of a problem includes a link to files containing the sample data.  These files are a good start for generating your more robust sets of testing data.

Program Structure
  • Input is obtained from standard input:
    • In Java, use System.in
    • In C++, use the cin input stream
    • In C, this is the default in scanf; when using functions like fgets, fscanf, etc., use file stdin
    • In Python, read from sys.stdin, or use the input function
  • All test cases used in judging will conform to the input specifications. It is not necessary for you to detect invalid input. If, for example, the problem statement specifies that an integer is positive, you do not need to check for or handle non-positive integers (or non-integers). Always read the specification carefully.
  • Output is sent to standard output:
    • In Java, use System.out
    • In C++, use the cout output stream.
    • In C, this is the default in printf; when using functions like fprintf use file stdout
    • In Python, use the print function; this is its default
  • Kattis ignores all output to standard error (System.err in Java, cerr in C++, stderr in C, sys.stderr in Python), so you can use this for debugging notes (though this will slow your program down).
  • Your program should refer to no files, either for input or output. Trying to read from an input file is likely to cause a run-time error.
  • Kattis uses specific compiler flags (see Compilation and Execution Details below.). You should use these same flags when compiling on your machine.  Your site should have the IDE’s that they provide set up to use them by default.  If you test from the command line, be sure to include the flags listed below.
  • If your program’s exit status is not zero, Kattis will judge it as a runtime error. C11, C++, Java, and Python all default to returning zero if you do not specify an explicit exit code.
  • Java programmers: Do not put your code in a package (i.e., do not put a line like “package hello;” at the top of your source file). Be careful, by default an IDE may add a package line automatically.  A package declaration unnecessarily complicates submission (below) or causes a run-time error.
Clarification Request
During the contest you can submit requests for clarifications to the judges. To do so, click on Clarifications. The clarifications page has three sections:
  • submitted clarification requests from your team that have not yet been answered
  • a form for submitting a clarification request
  • clarification requests with answers from the judges.

When you submit a clarification request, please select a subject (either one of the problems or “general’‘) and write your request in English. The third section contains answers to your requests and sometimes answers to other teams’ requests, in case the judges choose to reveal the question and the answer to all teams. Notifications that there are new clarification replies are displayed on all Kattis web pages, but not on other pages (e.g., API documentation and scoreboards).

Submitting in the browser

Choose the Submit button at the top of the Kattis web interface.  A form appears with places to select the Problem ID and Language and a place to drag or choose files to upload.  Typically you upload just a single source file that you have thoroughly tested, though multiple files are allowed.  Unlike past years, the root of the file name does not have to match the problem ID.Java users: You must also enter the Main Class – the name of the class containing the main method.  Caution:  This is not the file name but the class name.  If your file hello.java has the class hello containing your main method, you indicate that the Main Class is just hello.  If you misspell this, you will get a compiler error saying you have an “Unknown mainclass”.

How does Kattis handle a submitted program?

First, Kattis will compile your program. If the compiler fails to compile your program, or does not complete in a reasonable amount of time, Kattis will judge it as Compile Error. Otherwise, Kattis will execute the compiled binary on the first set of secret judge’s input (there may be several). If the execution takes too long it will be judged as Time Limit Exceeded. If it produces way too much output, it will be judged as Output Limit Exceeded.  If it crashes, terminates with non-zero exit status, or uses too much memory, it will be judged as a Run Time Error. If the execution terminates correctly (exit status 0), Kattis will inspect the output produced to verify that it is correct. If it is incorrect, Kattis will judge the submission as Wrong Answer. These judgments will be discussed in more detail below.

Note that your submission’s output is only inspected if it successfully terminates in time, thus a Time Limit Exceeded or Run Time Error does not mean that output was correct up until the point where the program crashed or time ran out. Note that if your program should, for instance, divide by zero after the time limit has been reached, it will be judged as Time Limit Exceeded rather than Run Time Error. If there are multiple test files, Kattis will continue with the same procedure for the next set of judge’s test data, as long as no error has been found. As soon as an error is detected Kattis will stop and report that error. Each test is run with a new invocation of your program, so your program does not need to be adapted in any way to handle multiple test files. Each test file will follow the input specification for the problem. If your program passes all test files successfully, it will be judged as Accepted.

Tracking your submissions

You can track the status of your submission in the web interface by choosing your team name from the top right menu.  On this page you will see a list of all submissions you have made, in reverse chronological order. As the submission proceeds through the judgement process your submissions page will reflect this. The states a submission will pass through while it is being judged are:

  1. New
  2. Waiting for Compile
  3. Compiling
  4. Waiting for Run
  5. Running
  6. Final Judgement
Possible Judgements
When Kattis has judged your submission, you will get a reply telling you the status of your submission. The following judgements are possible (these are described in more detail below):
  • Accepted
  • Compile Error
  • Run Time Error
  • Time Limit Exceeded
  • Output Limit Exceeded
  • Wrong Answer

For compile errors, there will be extra information apart from the judgement itself, to help you debug your code syntax. This information will be available on the page for the respective submission (available by clicking on the corresponding submission ID number in your list of submissions).If your program compiles successfully, Kattis starts on a sequence of runs with secret judges’ data.  Kattis stops and reports the first error found.  If a run completes normally, the output for that run is tested. Kattis only goes on to further test runs if the last run’s output was correct.

Accepted

Accepted means that we were very happy with your program, and that it (as far as Kattis could tell) solved the problem correctly. Congratulations!

Compile Error

Compile Error means that Kattis failed to compile your source code. In order to help you debug the error, the compiler output will be available as extra information. This error does not cause a 20 minute time penalty. (You do waste the time spent submitting it!)  Information about what compilers and flags are used can be found below. Common errors in Java submissions include:

  • Misnaming the Main Class, leading to an error “Unknown mainclass”; you must specify the name of the class that contains the starting main method
  • The class name contains no .java
  • Putting the class in a package and entering the plain class name; then you also get the error “Unknown mainclass”

Run Time Error

Run Time Error means your program crashed during execution with our secret test input. More precisely it means that it terminated with a non-zero exit code, or with an uncaught exception.  Common examples:

  • Array out-of-bounds references
  • Stack overflows (likely infinite recursion)
  • Using too much memory
  • Invalid memory references (e.g., dereferencing a null pointer)
  • Trying to open a file

You may make this last error if you mistakenly try to open an input or output file for reading or writing data. Remember to just use standard input and output as discussed earlier. Note that since the exit code is used to determine normal termination, it is important that your main function in a C or C++ program does not return a non-zero value.

Time Limit Exceeded

Time Limit Exceeded means that your program ran for too long. When the time limit is exceeded, the program is terminated. The output produced is not inspected until your program has finished successfully, so getting Time Limit Exceeded does not mean that the output you had produced so far was correct.  The time limit is applied separately to each run with judges secret test data.  Usually there are multiple test runs before a submisison is accepted. Each individual problem lists a time limit, that is the limit on the web server, not your local machine. You should be given a list of approximate time limits appropriate for your tests on the hardware used at your site.

Output Limit Exceeded

Output Limit Exceeded means that your program has produced too much output and we decided to shoot it down before it flooded our hard drive. Check to make sure that you don’t get stuck in an infinite loop where you print something and that you handle input termination correctly.

Wrong Answer

Wrong Answer means that your program finished within the time limit, but that the answer produced was incorrect. This error is usually the most frustrating one, since typically no extra information will be given. Sometimes, the only way around it is to try to find bugs in your code by constructing tricky test data yourself. Please note that it is possible to technically have a correct solution, but get a Wrong Answer because you formatted the output incorrectly. While problems are designed to minimize the possibility of such formatting errors, please note the the following:

  • Only if text formatting is explicitly given as a part of the problem, then formatting variations cause a Wrong Answer.
  • Where formatting is not a part of the problem (the most common case), then the system allows variations in white space, and problems are not likely to require much canned text in an answer.  The output validator looks at the output as a sequence of white-space separated tokens.
  • Instructions describing floating point answers are likely to have an error bound noted, so a rounded answer with an exact textual match of digits is not required in your output.

All the errors that come after successful compilation do cost a 20 minute time penalty if a later submission of the problem is accepted.

Compilation and Execution Details
Please see the Kattis documentation for the exact compiler flags that will be used to compile your submission, as well as how it will be run:
  • C
  • C++
  • Java
  • Python 3
  • Kattis supports a host of languages (including Javascript). Make sure your contest site provides you with an appropriate IDE for the contest.

System libraries: You are allowed to use all standard libraries included with the language you are working in.Please note that, even if your site’s computers have a given library installed on them, that does not mean it will be available on Kattis. Most notably, Kattis does not support Python libraries like Scipy, Numpy, and Pandas.

Practical Information and Tips

Getting ready for ICPC?

Here is a checklist

  1. Make sure you’re eligible to compete. This PDF flowchart might help.
  2. Find a coach and two teammates (unless they found you first).
  3. Make sure your coach registers your team before the deadline.
  4. Understand the regional contest rules.
  5. Study the notes to teams.
  6. Participate in the North American online practice contests, or by solving problems on Kattis.
  7. Bring lots of reference materials.
  8. Understand your programming language,
  9. Beef up your programming skills.
  10. Check Your Mathematical Knowledge.
  11. Practice, practice, practice.
Reference Material

We suggest bringing language reference manuals, data structures and algorithms textbooks, discrete math textbooks, and general math reference books. (The problems don’t typically assume or require sophisticated mathematics, but you might be able to use math to simplify a problem or find an easier solution.) Also bring printouts of the problem statement and solution for any practice problems you worked on, and any notes you or your coach may have created.

Note that while sites will usually provide some online documentation, it is not a good idea to rely on that too heavily. When one of your team members is using the computer, he or she should be programming, not browsing through online documentation looking for inspiration. Use online documentation to help you remember the details of what you already know.

Understanding your Programming Language

Obviously the better you know your language the better you’ll do. Here are some suggestions about what you should know.

All Languages

  • Character classification and case conversion.
  • String handling, including converting between strings and numbers.
  • Using arrays.

C

  • The formatted I/O functions printf and scanf, and the corresponding string functions sprintf and sscanf, which are much more powerful than most people realize.
  • The string functions strchr, strrchr, strspn, strcspn, strpbrk, strstr, and strtok.
  • The binary search function bsearch and the quicksort function qsort.

C++

  • The STL classes bitset, deque, list, map, priority_queue, queue, set, stack, and vector.
  • The STL algorithms accumulate, adjacent_find, binary_search, copy, count, equal, fill, find, for_each, generate, includes, inner_product, lexicographical_compare, max_element, merge, min_element, mismatch, next_permutation, prev_permutation, remove, replace, reverse, rotate, set_difference, set_intersection, set_symmetric_difference, set_union, sort, swap, transform, and unique.
  • The STL function objects such as equal_to, logical_not, and plus.
  • The string stream classes istringstream and ostringstream.

Java

  • The Scanner and Formatter classes, plus printf.
  • The wrapper classes Boolean, Character, Double, and Integer, which have a number of useful methods.
  • The java.util collection classes ArrayList, BitSet, HashMap, HashSet, LinkedList, Stack, TreeMap, and TreeSet.
  • The java.util class StringTokenizer.
  • The java.util.regex classes Matcher and Pattern.
  • The java.math class BigInteger.

Python 3

  • For standard input: read, readline, readlines
  • Basic data structures: list, dict, set, tuple
  • Modules for data advanced structures: array, collections, heapq, bisect
  • Regular expressions: re – compile, match, search
  • Note: Python may not be a good choice for time-critical problems.
Beef up your Programming Skills

Knowledge of the following data structures, algorithms, and programming techniques will be useful.

  • Basic data structures: stacks, queues, arrays, and lists.
  • Basic algorithms: sorting and searching.
  • Binary trees.
  • Brute-force search.
  • Backtracking search.
  • Generating all permutations or combinations of a set.
  • Recursion.
  • Dynamic programming.
  • Graphs and their algorithms, including breadth-first search, depth-first search, minimum spanning trees, shortest paths, topological sort, and transitive closure.
  • Basic parsing techniques such as recursive descent, operator precedence, or infix-to-postfix conversion.

You should also practice with a variety of different types of problems. Mid-Central usually includes some combination of the following:

  • Short problems with elementary coding,
  • Longer problems, but where the instruction sequence is laid out for you; you just have to make sure you make no mistakes when coding it!
  • Problems requiring basic data structures
  • Problems with fairly direct applications of upper level algorithms
  • Problems requiring a very creative solution, no matter how many algorithm classes you have taken
Mathematical Skills

Please note that this is meant to be a guideline and an aid, not a promise or a rule. What some people consider common knowledge others may consider to be very uncommon mathematics.

The Mid-Central Regional Competition may include higher math as described below:

Higher math may include:

  • matrix operations: multiplication, addition, subtraction; solving a matrix equation
  • 3D vector operations: addition, scalar multiplication, dot product, cross product, triple scalar product as volume
  • root finding of continuous functions by bisection
  • calculus of one variable topics: finding extrema with the help of derivatives
Practice Recommendations

Schedule. Ideally you should practice once per week. Have a 1-3 hour practice where you try to solve as many problems as possible under contest conditions. Any problems that you don’t solve must be solved during the week before the next practice. Keep a record of all the problems you solved, their solutions, and any notes about unusual features of the problem.

Team Strategy. You only have one computer, so learning to work as a team is essential. The most important thing is to accurately judge the difficulty of the problems. Many talented teams have done poorly because they started working on one of the hardest problems first. Remember that the length of a problem description is not necessarily related to its difficulty. For additional tips, check out Teamwork in Programming Contests: 3*1=4.

Problems. There are many sources for practice problems. Here are a few.

Text

Online

  • U. Texas / Kattis Practice for Regionals: Practices setup by Kattis folks to help in preparation for regionals and North America Championship
  • Open Kattis: Large collection of contest problems from all around the world. Open Kattis also provides the same judging system and backend that we use during the actual regional contest.
  • Project Euler: Collection of problems that tend to be more mathematically oriented.
  • The ACM ICPC Live Archive. Most of the regional and finals problems since 2000, configured for on-line problem judging.
  • The huge University of Valladolid archives in Spain, with on-line problem judging.

Other Competitions.

Coaches

General Information

If you are a high school teacher (or other adult representative such as a guidance counselor), and are interested in having your students compete at our tournament please contact us at the following email address: hsc dot ncna at gmail dot com

The coach is the official point-of-contact with the team prior to and during contest activities. A team may only have one coach and the coach cannot also be a contestant.

Whether you are a seasoned coach, or you’re just starting, you should make sure you’ve done the following:

Assemble one or more teams, each consisting of exactly three eligible students, plus an optional reserve.

In addition, you will need to:

  • Fully register your team(s) before the deadline. You must provide complete team member information before the deadline, or the registration will be cancelled. There are no registration fees for the HSC. However, some sites may charge a fee to defray site expenses.
  • Be familiar with your site’s facilities.
  • Help your team(s) practice.
  • Arrange for transportation to and from the contest.

Thank you very much for volunteering your time and energy as a coach!

Checklist

Whether you are seasoned ICPC coach, or you’re just exploring the possibility of sending teams to the ICPC Mid-Central USA regional contest, you should make sure you’ve done the following:

  1. Assemble one or more teams, each consisting of exactly three eligible students each, plus an optional reserve. Please see the official ICPC Regional Rules for more details on contestant eligibility. This PDF flowchart can also help you determine whether a contestant is eligible to participate in ICPC.
  2. Fully register your team(s) before the deadline. You must provide complete team member information before the deadline, or the registration will be cancelled.
  3. For the February 2023 regional, there will be a fee of $20 per person.  Invoices will be sent via the ICPC Foundation system.  If the invoice should go to someone other than the coach of the team, please let the Regional Contest Director know where to send the invoice.
  4. Understand the regional contest rules.
  5. Study the notes to teams.
  6. Be familiar with your site’s facilities.
  7. Help your team(s) practice.
  8. Arrange for transportation to and from the contest.
FAQ

How do I register a second/assistant coach?

In the ICPC Registration system, add the additional coach to the team as an Attendee, then type in Assistant Coach as both the Badge Role and the Certificate Role. See a screenshot.

How do I cancel a team reservation?

You can self-cancel a reservation through the ICPC registration system.

Site Directors

Preparing for the Contest

Make sure you have reviewed the Site Requirements and, in particular, the Internet access requirements. The contest is run with Kattis, the same judging system used at the ICPC World Finals and at many other contests worldwide. You must ensure that contestants have access only to the Kattis site (send your queries to the state site contacts or general queries) and that the provided compilers match, as closely as possible, the compilers used by the Kattis system.

In preparation for the contest, our Director of Systems will be running a number of dry runs using the exact same setup we will use on the day of the contest. We strongly encourage you to participate in these dry runs to ensure that everything is working correctly on your end.

Documentation Preparation

Each team must get a copy of the following documents, which you should print in advance of the contest, and provide to teams when they register on-site:

  • Kattis login sheet (1 per team). The login sheets will be sent to the site directors the week before the contest.
  • Notes to Teams (1 per team)
  • Practice Problem set (3 per team). This problem set will be available the week before the contest.

If necessary you should provide site-specific instructions. Here are some aspects on which you may need to provide site-specific instructions:

  • Login information for the contest machines.
  • Instructions on how to run the compilers, specially if it will be easy for students to inadvertently run the compiler in a way that is subtantially different than the Kattis setup (e.g., if your C++ compiler does not use C++11 by default)
  • Printing instructions.

Additionally, you must print copies of the actual Problem Set that will be used at the regional contest. However, these must not be handed out at registration. They should be distributed in such a way that students will not be able to see the problem set until the contest starts (see below for details)

Day before the Contest

The copies of the problem set may be printed the night before the contest. The printouts must be stored in a locked location overnight, and all copies must be accounted for before they are distributed at the contest. We recommend placing the copies in sealed envelopes (three copies per envelope) to easily distribute to the teams before the contest starts, and all remaining copies in a single large envelope (to distribute to the coaches once the contest starts).

Day of the Contest
  1. Each year one of the regional chief judges will act as the contest-day point of contact to handle all questions and corrections. Please see the Contact page to see who this will be.
  2. All contest-day administration will be done via the Kattis website. Judging is done automatically by the Kattis site, so there is no need to have on-site judges. Nonetheless, site directors (and anyone the site director designates) will be given judge privileges on Kattis so they can see all submissions and judgements.
  3. Once the contest begins, if there are any teams that did not show up, call or email the State Site Contacts.
Immediately after the Contest

Site Directors will have access to the unfrozen scoreboard on the Kattis site. However, You should not reveal this scoreboard until the Regional Contest Director sends out an “all clear”. In that message, the RCD will include an XML file that you can use to run ICPC’s scoreboard resolver. We encourage you to use this tool, as it makes for a very exciting reveal of the final results for the entire region.