**Solution Explanation**
The task is to output exactly what is given on the input.
No transformation, no additional characters – the output must be an exact copy of the input.
The simplest way to achieve this in C++ is to stream the whole input buffer directly to the output buffer.
`std::cin.rdbuf()` gives access to the underlying stream buffer of `std::cin`.
Writing this buffer to `std::cout` copies all characters (including newlines, spaces, etc.) unchanged.
The program works for any size of input and for any content (text or binary data).
---
#### Algorithm
1. Turn off the synchronization between C and C++ streams for speed (optional).
2. Copy the entire input buffer to the output buffer.
3. End.
---
#### Correctness Proof
We prove that the algorithm outputs exactly the input.
*Let `I` be the sequence of all characters read from standard input, and `O` be the sequence of all characters written to standard output by the algorithm.*
1. `std::cin.rdbuf()` returns a pointer to the stream buffer that contains exactly the characters that have been read from the input.
Therefore, the stream buffer holds the sequence `I`.
2. The statement `std::cout << std::cin.rdbuf();` writes the entire contents of that buffer to the output stream.
Consequently, the sequence written to the output is exactly `I`.
3. No other output is produced by the program.
Hence `O = I`.
Since `O` equals `I`, the algorithm outputs exactly the input, as required. ∎
---
#### Complexity Analysis
Let `n` be the number of characters in the input.
The algorithm performs a single linear copy of the input to the output.
- **Time complexity:** `O(n)`
- **Memory usage:** `O(1)` additional memory (the copy is done directly between the two streams).
---
#### Reference Implementation (C++17)
```cpp
#include
Disponibilità e prenota subito Immagini (24) Pacchetto(e)
- 8 Pensjonat Moncarapacho (1-8 osób) pacchetto.
- 8 3-6 nocy, Pensjonat-Moncarapacho (1-8 osób) pacchetto.
- 8 1-2 dni, Pensjonat-Moncarapacho (1-8 osób) pacchetto.