I'm preparing for upcoming GCJ Finals. This year GCJ supports only Linux, and I want to learn how to compile solutions on Linux (I think I used it 9 years ago in IOI but completely forgot how to do that...).
Suppose that A.cpp
, Main.java
, A.py
are source codes, A.in
is the input, and you want to output to A.out
.
On Windows+Cygwin, I usually do the following:
g++ -Wl,--stack,268435456 A.cpp -O2 < A.in | tee A.out
javac Main.java
java Main < A.in | tee A.out
python A.py
What commands do the same things on Linux?
The following things are installed on the machine:
- Debian Linux 9.4
- C++ 6.3.0
- Java 7 2.2.5
- Python 2 2.7.13