Frequently Asked Questions

To read the answer to each question, please click on the question itself:


  • Do I have to be in high school to compete? Open or Close

    Yes.

    This competition is designed for high school students who are learning computer programming—including AP Computer Science, informatics, software engineering, or any other kind.

    The difficulty level of this competition has been specifically designed to match the range of abilities we have seen in students 14 to 18 years of age, who have computer programming education ranging from ½ year to about 3 years.

    During registration, you will be asked to provide your school name and the name of your teacher (a guidance counselor or other school official name is acceptable). This will help verify your eligibility. We may also provide information about the competition to your school.

  • Do I have to be in Florida to compete? Open or Close

    No, not at all!

    Since this competition is held online, we welcome all students who are currently in high school!

  • Can I compete if I don't take computer programming classes at school? Open or Close

    Certainly! However, we would still like to know your school name on the registration form to help confirm eligibility. Also, we'd appreciate it if you could provide the name of a teacher or guidance counselor at your school.

  • Can I participate if I don't know Java or C++ or C? Open or Close

    You are certainly welcome to sign up and try!

    However, it would be in your interest to get familiar with one of the official contest languages. Try some online tutorials and take a look at our archive of problems with Java and C++ solutions.

    Also, you are free to use any reference materials you can find to help you write your programs. We ask only that you do your own work, and don't collaborate with anyone.

  • What kind of computer do I need, in order to participate? Open or Close

    Your computer must have the following:

    • A reliable internet connection.

    • A modern web browser, such as Firefox or Chrome.

    • A viewer for PDF files.

    • Software for writing, compiling, and testing your C/C++ or Java code.

    • We recommend that you also try the command-line tools used by the judges.

  • What software do you recommend for writing Java code? Open or Close

    For the kind of Java programs used in this contest, simpler is better!

    For that reason, we recommend jGRASP and JCreator as excellent environments for writing, compiling, and testing your Java code.

    We also encourage trying plain text editors such as Notepad++, gedit, and vim. These can be used with command-line tools for compiling and running your code. (This is how the judges do it.)

    Please make sure that your Java classes are all in the default package. That is, do not put a package statement in your Java source file. Some Java development environments "helpfully" add this line for you—which means that you must remove it before submitting.

  • What software do you recommend for writing C/C++ code? Open or Close

    For the kind of C and C++ programs used in this contest, simpler is better!

    For that reason, we recommend Code::Blocks as an excellent environment for writing, compiling, and testing your C or C++ code.

    We also encourage trying plain text editors such as Notepad++, gedit, and vim. These can be used with command-line tools for compiling and running your code. (This is how the judges do it.)

  • Should I use Eclipse or NetBeans to write my Java code? Open or Close

    You must submit your solution in a single Java source file, not as a project with multiple files.

    Since Eclipse and NetBeans are development tools designed primarily around creating large projects with lots of source files, we do not recommend using these environments to create your Java solutions for the contest.

    It is possible to use Eclipse to write, compile, and edit a single Java file that can then be extracted from the Eclipse environment, and compiled and run separately. However, you need to be a pretty advanced Eclipse user to figure this out.

    Additionally, these tools may perform "helpful" actions such as automatically inserting a package statement in your source file. Our systems expect all Java classes to be in the default package, which means you'll need to delete this line before submitting your source file.

  • Should I use Visual Studio or Eclipse CDT to write my C/C++ code? Open or Close

    You must submit your solution in a single C or C++ source file, not as a project with multiple files.

    Since Microsoft Visual Studio and the Eclipse C Development Toolkit are intended primarily around creating large projects with lots of source files, we do not recommend using these environments to create your C or C++ solutions for the contest.

    We know that it is possible to use these tools to write, compile, and test a single C or C++ file that can then be extracted from the environment, and compiled and run without the project files. However, you need to be a pretty experienced user to figure this out.

    In addition, Microsoft Visual Studio (including Visual Studio Express) use a variant of C and C++ that is slightly different from what the judges will be using.

  • How do I find out the problems to work on? Open or Close

    As soon as the competition starts, the set of problems will be available for download on the HSPT competition website.

    The link to the competition website, along with your individual credentials for login, will be provided sometime after you register and before the first practice session. These are typically sent to the email address that you used for registration. Check your spam folder!

    You must be logged in to the HSPT competition website to access the problems! This site may also publish the problems some time after the competition is over.

  • How many problems will there be? Open or Close

    There will be multiple problems of varying difficulty available to work on.

    The actual number of problems will not be published before the competition starts, but in most years of HSPT history, there have been more than 6 and fewer than 16.

    Remember, you can work on the problems in any order.

  • Do I have to work on the problems in order? Open or Close

    No, you certainly do not!

    You may work on the problems in any order.

    Note that the problems could vary quite widely in level of difficulty.

  • Why are some of the problems so hard? Open or Close

    We have been continuously impressed by the talent of high school students attending our competitions! The problems, therefore, contain a variety of difficulty levels.

    Remember, you can work on the problems in any order.

  • Why are some of the problems so easy? Open or Close

    The students participating in the contest are from different grade levels and different skill levels. The problems, therefore, contain a variety of difficulty levels. Note that "easy" is a relative term—some may find geometry problems very easy, but not everybody does!.

  • How do I submit my program to be judged? Open or Close

    Once you have written a program to solve a problem, you have to submit it to the judges for testing. To do this,

    • You must be logged in to the HSPT submission system.

    • You must use the HSPT submission system to send your program to the judges. Email or other methods will be ignored.

    • You must submit only a single source code file.

    • The source code file must be named after the filename that is given for each problem:

      • Name your Java source file FILENAME.java

      • Name your C++ source file FILENAME.cpp

      • Name your C source file FILENAME.c

      where the FILENAME part should be replaced with the exact filename given in the problem.

  • How will the judges compile my Java program in the contest? Open or Close

    The judges will compile your Java source code using the Java compiler (javac) on the command line in a Linux environment. The command used will be similar to the following:

    javac FILENAME.java

    For example, for a problem with filename sorting:

    javac sorting.java

    Note that no CLASSPATH or other external dependencies will be supported during a judged run.

  • How will the judges run my Java program? Open or Close

    The judging system will run the program that was compiled from your Java source code using java on the command line in a Linux environment. The input and output will be redirected to and from files. Nobody will type input on the keyboard!

    The command used will be similar to the following:

    java -Xrs -Xss8m -Xmx524288k FILENAME < FILENAME-input.txt > output.txt

    For example, for a problem with filename sorting:

    java -Xrs -Xss8m -Xmx524288k sorting < sorting-input.txt > output.txt

    Note that no CLASSPATH, jar files, data files, external programs, or any other external dependencies will be supported during a judged run.

    Also note that your classes must all in the default package, in order for the run to succeed. That is, do not put a package statement in your Java source file, or you will get a Run-Time Error response.

  • How can I use multiple Java classes when submitting just one source file? Open or Close

    There are actually two ways to do this. You can create a nested or inner class inside the main class (the one with the same name as the Java source file, which should have your main method). Be sure you understand how to reference these classes.

    Alternatively, you can simply declare multiple top-level classes within the file. While this second approach is not recommended for writing commercial software, it works just fine for this kind of competition.

    Please make sure that your classes are all in the default package. That is, do not put a package statement in your Java source file.

  • How will the judges compile my C++ program? Open or Close

    The judging system will compile your C++ source code using GCC's C++ compiler (g++) on the command line in a Linux environment. The command used will be similar to the following:

    g++ -lm -std=c++11 -o FILENAME FILENAME.cpp

    For example, for a problem with filename sorting:

    g++ -lm -std=c++11 -o sorting sorting.cpp

    Note that only the math library will be linked (-lm).

  • How will the judges run my C++ program? Open or Close

    The judging system will run the binary program that was compiled from your C++ source code directly, as if from a command line, in a Linux environment. The input and output will be redirected to and from standard streams, each of which may connect your program to a file or another program. Nobody will type input on the keyboard, and nobody will look at the program output until it has finished running.

    The command used will be similar to the following:

    ./FILENAME < FILENAME-input.txt > output.txt

    For example, for a problem with filename sorting:

    ./sorting < sorting-input.txt > output.txt

    The use of redirection means that the filenames could be different, but your program doesn't have to know the exact filename.

    Note that no external dependencies (files, programs, or libraries—except as mentioned elsewhere) will be supported during a judged run.

  • May I use STL with C++? Open or Close

    Yes.

    Your C++ source code must compile using only default C++ libaries, but this includes the Standard Template Library (STL), as well as the math library.

    The only binary library that will be linked to your code during the compilation step is the math library (-lm on the command line).

  • May I use boost libraries with C++? Open or Close

    No. You may not use boost.

    Your C++ source code must compile using only default C++ libaries. The Standard Template Library (STL) is included, as is the math library. The boost libraries are not yet part of standard C++.

    The only library that will be linked to your code during the compilation step is the math library (-lm on the command line).

  • Will C++11 or C++14 standard language features be available? Open or Close

    Yes and no.

    Starting with the 2015-2016 competition, we will include the C++11 compiler settings.

    We are still investigating support for the C++14 standard.

  • How will the judges compile my C program? Open or Close

    The judging system will compile your C source code using GCC's C compiler (gcc) on the command line in a Linux environment. The command used will be similar to the following:

    gcc -lm -std=c99 -o FILENAME FILENAME.c

    For example, for a problem with filename sorting:

    gcc -lm -std=c99 -o sorting sorting.c

    Note that only the math library will be linked (-lm).

  • How will the judges run my C program? Open or Close

    The judging system will run the binary program that was compiled from your C source code directly on the command line in a Linux environment. The input and output will be redirected to and from files. Nobody will type input on the keyboard!

    The command used will be similar to the following:

    ./FILENAME < FILENAME-input.txt > output.txt

    For example, for a problem with filename sorting:

    ./sorting < sorting-input.txt > output.txt

    The use of redirection means that the filenames could be different, but your program doesn't have to know the exact filename.

    Note that no external dependencies (files, programs, or libraries—except as mentioned elsewhere) will be supported during a judged run.

  • Why did I get "Compile Time Error" when my program compiles correctly for me? Open or Close

    One big reason we've seen for this is that you may have copied text from the PDF problem, and then pasted it directly into your source code. When that happens, some characters (particularly quotes, apostrophes, and dashes) get turned into unrecognizable characters that cause problems in the command-line compilers. For this reason, we do not recommend copy/paste from the problem PDF.

    For Java programs, another common reason we see is that your Java class must be in the default package, not a named package. Eclipse and other programming environments sometimes will automatically add a package statement into your code, so check for this and simply remove the line.

    For C and C++ programs, we sometimes see people using language features or libraries that our system does not support.

    We strongly recommend installing and trying the command-line compilers yourself, to help identify any other problems. Please see the FAQs "How will the judges compile my program?"

  • For a "Run-Time Error", can you say what line number my program crashed on? Open or Close

    No.

    If your program crashes, you will get a response of Run-Time Error. That is all the information you will get!

    You should check your code for things like:

    • null pointer assignments

    • an array index or string index that goes out of bounds (possibly -1)

    • parsing or type conversion errors

    • stack overflows from too much recursion

    • allocating too much memory dynamically

    Please do not waste the judges' time by asking this kind of question during the competition.

  • Why did I get "Wrong Answer" when my program works correctly for me? Open or Close

    The HSPT judges have prepared comprehensive test data to evaluate your program.

    The sample test data provided with the problem is just that—a sample. You should analyze the specification for all valid possible types of input, and create your own test data that is sure to test all possibilities.

    You can be assured that the judges' test data will conform to the input specification in the problem. There is no need to validate input in your program.

  • What input data did my program fail on? Open or Close

    The judges will not answer this question during the competition.

    You are strongly encouraged to analyze the problem and make sure that you create your own test data that will exercise your program as completely as possible.

    At some point after the competition, the HSPT judges may post their test data on this web site. At that time, you can run your program against the full set of test data.

  • What is wrong with my output format? Open or Close

    The judges will not answer this question during the competition.

    You are strongly encouraged to look at the "Output" specification in the problem, and try to match the format as closely as possible.

    At some point after the competition, the HSPT judges may post their test data (including output) on this web site. At that time, you can see examples of expected output format, and compare it to the output from your program.

  • How does the judging system distinguish between "Wrong Answer" and "Presentation Error"? Open or Close

    The judging software uses a set of heuristics to distinguish between parts of the output that are considered essential and parts that are relatively cosmetic. If output for any test case differs in the essential parts from the expected values, the software will select Wrong Answer. If all the essential parts are present in the output for every test case, but there are cosmetic differences present for one or more test cases, the software will select Presentation Error.

    This is not guaranteed to match exactly with what a human judge would select. But then, human judges aren't guaranteed to match exactly with each other, either. (We take extra steps in our on-campus HSPT to make sure that the human judges have highly consistent responses.)

    Most importantly, neither of these is Correct, meaning that you will be assessed a 20-minute penalty if you solve the problem. To avoid the penalty and solve the problem on the first submission, please read the output specification carefully and check your program's output before submitting.

  • Why aren't your output specifications simpler? Open or Close

    We are aware that many ACM-ICPC-style contests are gravitating towards extremely simple output formats. However, at the high school level, we believe that formatting output has significant value in teaching:

    • Mastery of stream output routines (printf is a bit tricky!)

    • Attention to detail—even "invisible" details like whitespace

    • Close adherence to a written specification

    Plus, we think it's a lot more fun to write a program that outputs:

    Crystel vanquished 17 zombies.

    instead of just:

    17

  • May I fix my program and re-submit it? Open or Close

    Yes, and this is highly encouraged.

    You can fix and submit your program as many times as you need in order to solve a problem.

    A time penalty will be assessed for the incorrect submissions, but this takes effect only once you solve the problem. The time penalty is used only as a tie-breaker for scoring. No penalty is assessed for an unsolved problem.

    Please do not abuse this privilege. Repeatedly submitting an incorrect program in a very short period of time puts a load on the servers, which may disrupt the contest experience for others. You should submit code only when you are confident that it will be judged to be correct!

  • Can I get points back for incorrect runs if I make a good argument? Open or Close

    Almost certainly not. The decisions of the judges are final.

    Sometimes, despite the best efforts of the problem setters, judges, and contest systems team, things go wrong. The contest system may automatically re-judge your previously submitted programs, if a judge determines that there was a problem with the judging system. If this happens, and an earlier version of your program is correct, then you will get a "Correct" response and the subsequent submissions won't be used in penalty time calculations. This re-judging process is automated for consistency and fairness for all contestants.

    If you request special consideration for a score adjustment, the judges will pretty much always deny your request. For example, those new to the contest system might have trouble with it—but that is why we typically provide practice sessions, preparation guides, FAQs, and other materials to prepare you for the competition. We strive to give you every opportunity to be on equal footing with every other contestant before the competition starts. It's up to you whether to make use of those opportunities ahead of time.

    We know from many years of experience that the best competition experience is when you spend your time in the contest focused on solving problems and writing code, rather than arguing with the judges.