fast input and output c++

#include <iostream>
#include <ios>

int main() {
    // To improve input/output speed
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);

    // Read input
    int n;
    std::cin >> n;

    // Process input
    for (int i = 0; i < n; ++i) {
        int x;
        std::cin >> x;

        // Perform operations with x

        // Print output
        std::cout << x << " ";
    }

    // Ensure that the output is flushed
    std::cout << std::endl;

    return 0;
}