Notes
- Run-Time Limits
- Processor Time: 5 seconds;
- Elapsed Time: 15 seconds;
- Global Memory: 2 MB;
- Stack Memory: 1 MB;
- Code Memory: 1 MB;
- Output to stdout: 1 MB.
- Data sizes
- char is 8 bits, signed;
- short int is 16 bits;
- int is 32 bits;
- long int is 32 bits;
- long long int is 64 bits;
- float is 32 bits: 23 mantissa, 8 exponent;
- double is 64 bits: 52 mantissa, 11 exponent;
- long double is 80 bits: 64 mantissa, 15 exponent, but occupies 12 bytes.
- Scanf and Printf formats
- for char use %c;
- for short int use %hd;
- for int and long int use %d;
- for long long int use %qd (not %lld);
- for float use %f;
- for double use %lf;
- for long double use %Lf (not %llf).
- Forbidden Functions - the following operations cause immediate program termination:
- Opening a file, pipe, or socket;
- Creating a process;
- Changing the action taken upon receipt of a signal.