DOMjudge team manual. Summary. Reading and writing. Submitting solutions. Viewing scores, submissions, etc.

Similar documents
DOMjudge team manual. Summary. Reading and writing. Submitting solutions. Viewing scores, submissions, etc.

DOMjudge team manual. Summary. Reading and writing. Submitting solutions. Viewing scores, submissions, etc.

DOMjudge team manual. Summary. Reading and writing. Submitting solutions. Viewing scores, submissions, etc.

DOMjudge team manual. Summary. Reading and writing. Submitting solutions. Viewing scores, submissions, etc.

1 DOMjudge Overview Scoreboard... 2

Algorithms for Programming Contests - Week 1

Kattis Team Guide version 1.1

CS31 Discussion 1E. Jie(Jay) Wang Week1 Sept. 30

Overview. - General Data Types - Categories of Words. - Define Before Use. - The Three S s. - End of Statement - My First Program

2004 Stanford Local Programming Contest

4 th Annual Virginia Tech High School Programming Contest (2017)

Lesson 3: Accepting User Input and Using Different Methods for Output

2005 Stanford Local Programming Contest

ACM SOUTH PACIFIC DIVISIONAL PROGRAMMING CONTEST

Australian Informatics Olympiad Thursday 23 August, Information Booklet

CS31 Discussion 1E. Jie(Jay) Wang Week3 Oct.12

CS 31 Discussion 1A, Week 1. Zengwen Yuan (zyuan [at] cs.ucla.edu) Humanities A65, Friday 10:00 11:50

Tips from the experts: How to waste a lot of time on this assignment

8. The C++ language, 1. Programming and Algorithms II Degree in Bioinformatics Fall 2017

2006 Stanford Local Programming Contest

DOMjudge An automated judge system for programming contests. Programming Systems Group Martensstr Erlangen Germany

Welcome to MCS 360. content expectations. using g++ input and output streams the namespace std. Euclid s algorithm the while and do-while statements

Linux Tutorial #1. Introduction. Login to a remote Linux machine. Using vim to create and edit C++ programs

4. Structure of a C++ program

Lecture Notes CPSC 224 (Spring 2012) Today... Java basics. S. Bowers 1 of 8

The NetBeans IDE is a big file --- a minimum of around 30 MB. After you have downloaded the file, simply execute the file to install the software.

DOMjudge Jury Manual. by the DOMjudge team Fri, 29 Dec :00:

CS 152: Data Structures with Java Hello World with the IntelliJ IDE

COMP322 - Introduction to C++ Lecture 01 - Introduction

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG

COMP322 - Introduction to C++ Lecture 02 - Basics of C++

CS 11 java track: lecture 1

Consider the above code. This code compiles and runs, but has an error. Can you tell what the error is?

How to Use the System

Information Packet Trinity University ACM High School Programming Competition 2011

Recursion. General Algorithm for Recursion. When to use and not use Recursion. Recursion Removal. Examples

Reading from and Writing to Files. Files (3.12) Steps to Using Files. Section 3.12 & 13.1 & Data stored in variables is temporary

the gamedesigninitiative at cornell university Lecture 7 C++ Overview

Official Competition Manual March 2, 2005

Lesson 2 Variables and I/O

Chapter 2: Introduction to C++

CS2141 Software Development using C/C++ C++ Basics

Computer Science II Lecture 1 Introduction and Background

Chapter 2: Special Characters. Parts of a C++ Program. Introduction to C++ Displays output on the computer screen

Problem Set 1: Unix Commands 1

Tutorial 2: Compiling and Running C++ Source Code

CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts)

Welcome to Python 3. Some history

the gamedesigninitiative at cornell university Lecture 6 C++: Basics

int n = 10; int sum = 10; while (n > 1) { sum = sum + n; n--; } cout << "The sum of the integers 1 to 10 is " << sum << endl;

CS 231 Data Structures and Algorithms, Fall 2016

Programming. C++ Basics

! A program is a set of instructions that the. ! It must be translated. ! Variable: portion of memory that stores a value. char

Shell Interface Assignment

Chapter 2 C++ Fundamentals

Programming Requirements

1 Unit 8 'for' Loops

A SHORT COURSE ON C++

Outline. Review of Last Week II. Review of Last Week. Computer Memory. Review Variables and Memory. February 7, Data Types

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to

Security Coding Module - Buffer Overflow Data Gone Wild CS1

Chapter 11 Introduction to Programming in C

Programming Problems 15th Annual Computer Science Programming Contest

5/3/2006. Today! HelloWorld in BlueJ. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont.

1. Download the JDK 6, from

Exercise 4: Loops, Arrays and Files

Introduction to Programming I COS1511 School of Computing Revision Notes

Berkeley Practice Contest Fall P. N. Hilfinger

Understanding main() function Input/Output Streams

Outline. Introduction. Arrays declarations and initialization. Const variables. Character arrays. Static arrays. Examples.

Topic 6: A Quick Intro To C. Reading. "goto Considered Harmful" History

CS246-Assign01 V1.1: Winter 2013

Algorithms and Programming I. Lecture#12 Spring 2015

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction

Program Organization and Comments

Chapter 1 - What s in a program?

COMP322 - Introduction to C++

CE221 Programming in C++ Part 1 Introduction

C and C++ I. Spring 2014 Carola Wenk

File Operations. Lecture 16 COP 3014 Spring April 18, 2018

Functions and Methods. Questions:

Week 1: Hello World! Muhao Chen

READ THIS NOW! Do not start the test until instructed to do so!

Discussion 1H Notes (Week 3, April 14) TA: Brian Choi Section Webpage:

Computer Programming

Exception Handling. Sometimes when the computer tries to execute a statement something goes wrong:

Exam 1. CSI 201: Computer Science 1 Fall 2018 Professors: Shaun Ramsey

Chapter 3 - Notes Input/Output

Chapter 2: Overview of C++

Chapter 1 INTRODUCTION

Topic 6: A Quick Intro To C

Exception Handling. Run-time Errors. Methods Failure. Sometimes when the computer tries to execute a statement something goes wrong:

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?

C++ For Science and Engineering Lecture 12

Soda Machine Laboratory

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program

Introduction to C++ Programming Pearson Education, Inc. All rights reserved.

Computer Programming : C++

ACM INTERNATIONAL COLLEGIATE PROGRAMMING CONTEST. California State University, Sacramento s. Contestant s Guide

The C++ Language. Arizona State University 1

Transcription:

judge DOMjudge team manual Summary /\ DOM DOM judge Here follows a short summary of the system interface. This is meant as a quick introduction, to be able to start using the system. It is, however, strongly advised that at least one of your team s members reads all of this manual. There are specific details of this jury system that might become of importance when you run into problems. BE WARNED! DOMjudge works through a web interface that can be found at https://example.com/ domjudge/team. See figures 1 and on the next page for an impression. Reading and writing Solutions have to read all input from standard in and write all output to standard out (also known as console). You will never have to open (other) files. See appendix A for some code examples. Submitting solutions You can submit solutions with the command-line program submit or from the web interface: Command-line Use submit <filename>. If your filename is of the form <problem>.<extension> where <problem> is the label of the problem and <extension> is a standard extension for your language, then these will automatically be detected. For a complete reference of all options and examples, see submit --help. Web interface From your team page, https://example.com/domjudge/team, click the file selection button in the left column and select the file(s) you want to submit. By default, the problem is selected from the base of the (first) filename and the language from the extension. Viewing scores, submissions, etc. Viewing scores, submissions and sending and reading clarification requests and replies is done through the web interface at https://example.com/domjudge/team. End of summary 1

Figure 1: the team web interface overview page. Figure : the scoreboard webpage.

1. Submitting solutions 1 Submitting solutions Submitting solutions can be done in two ways: with the command-line program submit or using the web interface. One of the interfaces might not be available, depending on the system configuration by the jury. A description of both methods follows. 1.1 Command-line: submit Syntax: submit [options] filename.ext... The submit program takes the name (label) of the problem from filename and the programming language from the extension ext. This can be overruled with the options -p problemname and -l languageextension. See submit --help for a complete list of all options, extensions and some examples. Use submit --help more when the help text does not fit on one screen. submit will check your file and warns you for some problems: for example when the file has not been modified for a long time or when it s larger than the maximum source code size. Filenames must start with an alphanumerical character and may contain only alphanumerical characters and +. -. You can specify multiple files to be part of this submission (see section 4 How are submissions being judged? ). Then submit displays a summary with all details of your submission and asks for confirmation. Check whether you are submitting the right file for the right problem and language and press y to confirm. submit will report a successful submission or give an error message otherwise. The submit program uses a directory.domjudge in the home directory of your account where it stores temporary files for submission and also a log file submit.log. Do not remove or change this directory, otherwise the submit program might fail to function correctly. 1. Web interface Solutions can be submitted from the web interface at https://example.com/domjudge/team. In the left column click the file selection button and select one or multiple files for submission. DOMjudge will try to determine the problem and language from the base and extension of the (first) filename. Otherwise, select the appropriate values. Filenames must start with an alphanumerical character and may contain only alphanumerical characters and +. -. After you hit the submit button and confirm the submission, you will be redirected back to your submission list page. On this page, a message will be displayed that your submission was successful and the submission should be present in the list. An error message will be displayed if something went wrong. Viewing the results of submissions The left column of your team web page shows an overview of your submissions. It contains all relevant information: submission time, programming language, problem and status. The address of your team page is https://example.com/domjudge/team. The top of the page shows your team s row in the scoreboard: your position and which problems you attempted and solved. Via the menu you can view the public scoreboard page 3

. Viewing the results of submissions with the scores of all teams. Many cells will show additional title text information when hovering over them. The score column lists the number of solved problems and the total penalty time. Each cell in a problem column lists the number of submissions, and if the problem was solved, the time of the first correct submission in minutes since contest start. This is included in your total time together with any penalty time incurred for previous incorrect submissions. Optionally the scoreboard can be frozen some time before the end of the contest. The full scoreboard view will not be updated anymore, but your team row will. Your team s rank will be displayed as?. Finally, via the top menu you can also view the list of problems and view/download problem texts and sample data, if provided by the jury..1 Possible results A submission can have the following results (not all of these may be available depending on configuration of the system): CORRECT COMPILER-ERROR TIMELIMIT RUN-ERROR NO-OUTPUT OUTPUT-LIMIT WRONG-ANSWER TOO-LATE The submission passed all tests: you solved this problem! There was an error when compiling your program. On the submission details page you can inspect the exact error (this option might be disabled). Your program took longer than the maximum allowed time for this problem. Therefore it has been aborted. This might indicate that your program hangs in a loop or that your solution is not efficient enough. There was an error during the execution of your program. This can have a lot of different causes like division by zero, incorrectly addressing memory (e.g. by indexing arrays out of bounds), trying to use more memory than the limit, etc. Also check that your program exits with exit code 0! Your program did not generate any output. Check that you write to standard out. Your program generated more output than the allowed limit. The output was truncated and considered incorrect. The output of your program was incorrect. This can happen simply because your solution is not correct, but remember that your output must comply exactly with the specifications of the jury. Bummer, you submitted after the contest ended! Your submission is stored but will not be processed anymore. 3 Clarifications All communication with the jury is to be done through clarifications. These can be found in the right column on your team page. Both clarification replies from the jury and requests sent by you are displayed there. 4

4. How are submissions being judged? There is also a button to submit a new clarification request to the jury; you can associate a specific problem or one of the general categories to a request. This clarification request is only readable for the jury. The jury can answer specifically to your team or send a reply to everyone if it is relevant for all. 4 How are submissions being judged? The DOMjudge jury system is fully automated. In principle no human interaction is necessary. The judging is done in the following way: 4.1 Submitting solutions With the submit program or the web interface (see section 1) you can submit a solution to a problem to the jury. Note that you have to submit the source code of your program (and not a compiled program or the output of your program). On the jury system your program enters a queue, awaiting compilation, execution and testing on one of the jury computers. 4. Compilation Your program will be compiled on a jury computer running Linux. All submitted source files will be passed to the compiler which generates a single program to run; for languages where this is relevant, the first file specified will be considered the main source file. Using a different compiler or operating system than the jury should not be a problem. Be careful however, not to use any special compiler and/or system specific things (you may be able to check compiler errors on the team page). The jury system defines ONLINE JUDGE and DOMJUDGE. These are defined as preprocessor symbols in compiled languages and as (environment) variables in scripted languages. 4.3 Testing After your program has compiled successfully it will be executed and its output compared to the output of the jury. Before comparing the output, the exit status of your program is checked: if your program gives the correct answer, but exits with a non-zero exit code, the result will be a run-error! There are some restrictions during execution. If your program violates these it will also be aborted with a run-error, see section 4.4. When comparing program output, it has to exactly match to output of the jury, except that some extra whitespace may be ignored (this depends on the jury s configuration of the problems). So take care that you follow the output specifications. In case of problem statements which do not have unique output (e.g. with floating point answers), the jury may use a modified comparison function. 5

4. How are submissions being judged? 4.4 Restrictions To prevent abuse, keep the jury system stable and give everyone clear and equal environments, there are some restrictions to which all submissions are subjected: compile time source size memory Compilation of your program may take no longer than 30 seconds. After that, compilation will be aborted and the result will be a compile error. In practice this should never give rise to problems. Should this happen to a normal program, please inform the jury right away. The total amount of source code in a single submission may not exceed 56 kilobytes, otherwise your submission will be rejected. During execution of your program, there are 5488 kilobytes of memory available. This is the total amount of memory (including program code, statically and dynamically defined variables, stack, Java VM,... )! If your program tries to use more memory, it will abort, resulting in a run error. number of processes You are not supposed to create multiple processes (threads). This is to no avail anyway, because your program has exactly 1 processor core fully at its disposal. To increase stability of the jury system, there is a maximum of 15 processes that can be run simultaneously (including processes that started your program). People who have never programmed with multiple processes (or have never heard of threads ) do not have to worry: a normal program runs in one process. 4.5 Java class naming Compilation of Java sources is somewhat complicated by the class naming conventions used: there is no fixed entry point; any class can contain a method main. Furthermore, a class declared public must be located in an indentically named file. In the default configuration of DOMjudge this is worked around by autodetecting the main class. When this feature is not used, then the main class should be Main, with method public static void main(string args[]), see also the Java code example in appendix A. 6

A. Code examples A Code examples Below are a few examples on how to read input and write output for a problem. The examples are solutions for the following problem: the first line of the input contains the number of testcases. Then each testcase consists of a line containing a name (a single word) of at most 99 characters. For each testcase output the string Hello <name>! on a separate line. Sample input and output for this problem: Input Output 3 world Jan SantaClaus Hello world! Hello Jan! Hello SantaClaus! Note that the number 3 on the first line indicates that 3 testcases follow. A solution for this problem in C: 1 #include <stdio.h> 3 int main() 4 { 5 int i, ntests; 6 char name[100]; 7 8 scanf("%d\n", &ntests); 9 10 for(i=0; i<ntests; i++) { 11 scanf("%s\n", name); 1 printf("hello %s!\n", name); 13 } 14 15 return 0; 16 } Notice the last return 0; to prevent a run-error! 7

A. Code examples A solution in C++: 1 #include <iostream> #include <string> 3 4 using namespace std; 5 6 int main() 7 { 8 int ntests; 9 string name; 10 11 cin >> ntests; 1 for(int i = 0; i < ntests; i++) { 13 cin >> name; 14 cout << "Hello " << name << "!" << endl; 15 } 16 17 return 0; 18 } A solution in Java: 1 import java.io.*; 3 class Main 4 { 5 public static BufferedReader in; 6 7 public static void main(string[] args) throws IOException 8 { 9 in = new BufferedReader(new InputStreamReader(System.in)); 10 11 int ntests = Integer.parseInt(in.readLine()); 1 13 for (int i = 0; i < ntests; i++) { 14 String name = in.readline(); 15 System.out.println("Hello "+name+"!"); 16 } 17 } 18 } 8

A. Code examples A solution in C#: 1 using System; 3 public class Hello 4 { 5 public static void Main(string[] args) 6 { 7 int ntests = int.parse(console.readline()); 8 9 for (int i = 0; i < ntests; i++) { 10 string name = Console.ReadLine(); 11 Console.WriteLine("Hello "+name+"!"); 1 } 13 } 14 } A solution in Pascal: 1 program example(input, output); 3 var 4 ntests, test : integer; 5 name : string[100]; 6 7 begin 8 readln(ntests); 9 10 for test := 1 to ntests do 11 begin 1 readln(name); 13 writeln( Hello, name,! ); 14 end; 15 end. And finally a solution in Haskell: 1 import Prelude 3 main :: IO () 4 main = do input <- getcontents 5 putstr.unlines.map (\x -> "Hello " ++ x ++ "!").tail.lines $ input 9