Code Submission Evaluation System Login

KILO 2018 3/5

Start:2018-09-20 16:30:00
End:2018-09-20 18:30:00

Tasks | Scoreboard | Statistics

CSES - KILO 2018 3/5 - InstructionsCSES - Instructions



In each task, you must submit one source file that contains the complete source code of your program. See below for some examples of what this means in practice.

After the submission, your code will be compiled and tested on the server. Your program must read from the standard input and write to the standard output.

Your code will be accepted, if it solves each test correctly within given time and memory limits.

C++ example

Assume that your task is to read one integer $i$ and output the integer $i+1$, for $0 \le i \le 999$. Here is an example of how to solve it with C++:
#include <iostream>
using namespace std;
int main() {
    int i;
    cin >> i;
    cout << i + 1 << "\n";

If the source code is in file, you should be able to compile the program on a typical Linux computer by running:

g++ -std=c++11 -O2 -Wall -o example

and then test it by running:

./example < input > output

If the file input contains one line with the integer 123, you should have in the file output one line with the integer 124.

Java example

Here is an example of how to solve the same problem with Java:
import java.util.Scanner;
public class Example {
    public static void main(String[] args) {
        Scanner scan = new Scanner(;
        int i = scan.nextInt();

Save the source code in, compile with javac and test by running:

java Example < input > output

Python example

Finally, here is a Python implementation of the same task.
i = int(input())

Save the source code in and test by running:

python3 < input > output