For solution program sources, use the following commands to build & run. Let 'prog' be the problem name:
g++ prog.cpp -std=c++11
cat prog_sample.in | ./a.out
cat prog_sample.out
cat prog_test.in | ./a.out
cat prog_test.out
cat prog_sample.in | java prog.java
cat prog_sample.out
cat prog_test.in | java prog.java
cat prog_test.out
cat prog_sample.in | python3 prog.py
cat prog_sample.out
cat prog_test.in | python3 prog.py
cat prog_test.out
There are two sets of input/output data: prog_sample.in/.out & prog_test.in/.out. The former is from sample input/output; the latter is from test input/output. The commas are removed from input data files, while the results are remained the same for the output files.
All the solution programs are tailored to the prog_sample.in and prog_test.in file format which have 5 test cases typically. Some problems have different number of test cases or their input format are different. Such programs are not very common and the files intuitively self-descriptive.
However, when solving programming problems via the Hacker Rank Online code judge system, the solutions are expected to process ONLY one test case in each execution. There will be multiple test cases provided.