zawatins-library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub zawa-tin/zawatins-library

:heavy_check_mark: test/input1.test.cpp

Depends on

Code

#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/6/ITP1_6_A"

#include "../src/template/input.hpp"

using namespace zawa::input;

int main() {
    int n;
    in(n);
    std::vector as(n, 0);
    in(as);
    for (int i = n - 1 ; i >= 0 ; i--) {
        std::cout << as[i] << (i == 0 ? '\n' : ' ');
    }
}
#line 1 "test/input1.test.cpp"
#define PROBLEM "https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/6/ITP1_6_A"

#line 2 "src/template/input.hpp"

#include <iostream>
#include <utility>
#include <vector>

namespace zawa::input {

template <typename T> 
void in(T& res) { std::cin >> res; }

template <typename Head, typename... Tail>
void in(Head& head, Tail&... tail) { in(head); in(tail...); }

template <typename T, typename U>
void in(std::pair<T, U>& res) { in(res.first); in(res.second); }

template <typename T>
void in(std::vector<T>& res) { for (auto& r : res) { in(r); } }

} // namespace zawa::input
#line 4 "test/input1.test.cpp"

using namespace zawa::input;

int main() {
    int n;
    in(n);
    std::vector as(n, 0);
    in(as);
    for (int i = n - 1 ; i >= 0 ; i--) {
        std::cout << as[i] << (i == 0 ? '\n' : ' ');
    }
}
Back to top page