### A Sample Problem

At Progteam, we solve programming problems. A programming problem asks you to write a program to perform a particular task. For example, let's take a look at this simple problem:

#### A + B Problem

Calculate a + b

##### Input

Two integers a, b (0 <= a, b <= 10)

##### Output

A single integer, the sum of a and b.

`1 2`
##### Sample Output
`3`

It does not seem to be very hard, does it? A sample solution in C++ and Java will be as follows.

```#include <iostream>
using namespace std;
int main()
{
int a,b;
cin >> a >> b;
cout << a + b << endl;
return 0;
}```
```import java.io.*;
import java.util.*;
public class Main
{
public static void main (String args[]) throws Exception
{
Scanner cin = new Scanner(System.in);
int a = cin.nextInt(), b = cin.nextInt();
System.out.println(a + b);
}
}```

The two programs above are straightforward. Note that at Progteam your programs will always be judged by a judge machine, instead of a human. The machine will run your program with test data (typically unknown to you) and check if your program's output matches exactly the correct answer. Therefore there are a few important things to keep in mind:

• Your must always read from standard input (stdin in C++ and System.in in Java) You should not read from a file, or pass the data as arguments of the main function.
• Similarly, you must always output to standard output (stdout in C++ and System.out in Java). You should not output to a file.
• Your output must be exactly the same as the correct answer, without any extra characters. You must remove any debugging printing and logs to standard output before submitting your program.

### Judge's Verdicts

Depending on whether your solution is correct or not, the judge will reply with a verdict after you submit your program. A verdict can be one of the following:

• Accepted: Your program has produced correct answers on all test data, you have successfully solved the problem! \o/
• Wrong Answer: Your program's output on some test data is wrong. This is a common case as most things don't go as smoothly as we expect, do they? :( Typically, you may have a bug in your code. Just debug carefully and fix it. However it is also possible that your algorithm is wrong. That is, you are solving the task in a wrong way.
• Time Limit Exceeded: Your solution is not efficient enough and did not finish in the given time limit. Most programming problems at Progteam are about algorithms. In this case you must find a faster algorithm for this task! Efficiency is a key factor of the problems you see at Progteam. So always think about a solution's complexity before you go ahead and code it!
• Runtime Error: Your program did not terminate normally and aborted on error. This most of the time could be a segfault of accessing prohibited memory, e.g. array index out of bound. On some judges if you allocate too much memory, you might also get this error. Other possibilities include divide-by-zero, stack overflow, etc.

### Using the Virtual Judge

Most of our practices are held on the Virtual Judge, where you may find problem descriptions and submit to the problems.

First, sign up for vjudge and login with your account. At each Progteam event we will provide you with a contest link. Open the link in a browser and you shall see the contest page. Here you go, read the problems and solve them! Alternatively, in vjudge contest tab you may search for "NYU" and find the ongoing contest in the search result.