Frequently Asked Questions

Which programming languages can I use?

The system supports the following programming languages:

g++ (GCC) 11.3.0

Arguments: g++ -x c++ -g -DMOG -O2 -std=gnu++20 -static {0} -o {1}                
                
# g++ --version
g++ (GCC) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc (GCC) 11.3.0

Arguments: gcc -x c -g -O2 -std=gnu11 -static -lm {0} -o {1}
                    
# gcc --version
gcc (GCC) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C# Mono 6.12

Arguments: csc {0}
                    
# csc
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.
Arguments: mono ./{submission}.cs
# mono --version
Mono JIT compiler version 6.12.0.205 (tarball Sun Jul 30 10:33:25 UTC 2023)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
 TLS: __thread
 SIGSEGV: normal
 Notifications: epoll
 Architecture: amd64
 Disabled: none
 Misc: softdebug
 Interpreter: yes
 LLVM: supported, not enabled.
 Suspend: hybrid
 GC: sgen (concurrent by default)

PyPy 7.3.10

Arguments: pypy {0}
                    
# pypy --version
Python 3.9.15 (21401ebc2df332b6be6e3d364a985e951a72bbbd, Dec 05 2022, 18:37:07)
[PyPy 7.3.10 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]

Python 3.9.18

Arguments: python3 -O {0}
                    
# python3 -VV
Python 3.9.18 (main, Aug 26 2023, 11:50:23)
[GCC 10.3.1 20211027]

OpenJDK 17.0.8

⚠️ You must have a class named Main that contains the main static method. This method is the entry point of your program.

Arguments: javac -cp ".;*" {0}
                    
# javac --version
javac 17.0.8
Arguments: java -Dfile.encoding=UTF-8 -XX:+UseSerialGC -Xms32m -Xmx{memory_limit*1024}M -Xss64m -DMOG=true Main
# java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+7-alpine-r0)
OpenJDK 64-Bit Server VM (build 17.0.8+7-alpine-r0, mixed mode, sharing)

Kotlin 1.7.21

Arguments: kotlinc -d . {0}
                    
# kotlinc -version
info: kotlinc-jvm 1.7.21 (JRE 17.0.8+7-alpine-r0)
Arguments: kotlin -Dfile.encoding=UTF-8 -J-XX:+UseSerialGC -J-Xms32M -J-Xmx{memory_limit*1024}M -J-Xss64m -J-DMOG=true MainKt
# kotlin -version
Kotlin version 1.7.21-release-272 (JRE 17.0.8+7-alpine-r0)

Which kind of input/output can I use?

MOG only supports the standard input and output, the system does not allow you manipulate files, otherwise, will be sentenced for Runtime Error or Wrong Answer.

When I submit a program, which are the possible results?

Here is a list with the possible submission results you can get:

  1. Pending – Your solution is waiting for judgment, this process is generally not very long.
  2. Compiling – Your code is being compiled.
  3. Compilation Error – Your code couldn't be compiled. You can see the errors at the submission's details.
  4. Running – Your program is running.
  5. Accepted – Your program is correct, congratulations!
  6. Wrong Answer – Your solution didn't output the correct solution.
  7. Runtime Error – Your solution crashed during execution.
  8. Time Limit Exceeded – The running time of your program is beyond the problem time limit.
  9. Idleness Limit Exceeded – Your program waste too much time in idle status (IO, CPU waiting, etc.).
  10. Memory Limit Exceeded – The running memory of your program is beyond the problem memory limit.
  11. Internal Error – There was an error on MOG system.

Which kind of errors will be penalized during a contest?

  1. Wrong Answer
  2. Runtime Error
  3. Time Limit Exceeded
  4. Idleness Limit Exceeded
  5. Memory Limit Exceeded

Problem Score

Once a user solves a new problem his score will increase in value equal to the problem score. A problem is considered solved if the user accepted it in a real or virtual contest too, thus no extra submissions are needed.

The problem score formula is quite simple: $\large{\lfloor \frac{108}{12 + S} \rfloor + 1}$, where $S$ is the different number of users who solve the problem. The problem score is an integer between $1$ and $10$ inclusive and of course, the more users solve a problem, the lower the score will be.

How to solve A+B problem ?

Given two small integers $A$ and $B$ what is the result of $A + B$ ?

C++ C C# Java Kotlin Python