1 solutions

  • 1
    @ 2024-4-13 12:42:23

    #include #include #include

    int main() { int n; std::cin >> n; std::vector nums(n);

    for (int i = 0; i < n; ++i) {
        std::cin >> nums[i];
    }
    
    std::reverse(nums.begin(), nums.end());
    
    for (int i = 0; i < n; ++i) {
        std::cout << nums[i] << " ";
    }
    std::cout << std::endl;
    
    return 0;
    

    }

    • 1

    Information

    ID
    6904
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    1
    Tags
    # Submissions
    8
    Accepted
    6
    Uploaded By