cp-documentation

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

View the Project on GitHub zawa-tin/cp-documentation

:heavy_check_mark: std::pairの入出力
(Src/Template/PairIO.hpp)

概要

std::pairに対する入出力を定義しています。

Depends on

Required by

Verified with

Code

#pragma once

#include "./TypeAlias.hpp"

#include <iostream>
#include <utility>

namespace zawa {

template <class T1, class T2>
std::istream &operator>>(std::istream& is, std::pair<T1, T2>& P) {
    is >> P.first >> P.second;
    return is;
}

template <class T1, class T2>
std::ostream &operator<<(std::ostream& os, const std::pair<T1, T2>& P) {
    os << '(' << P.first << ',' << P.second << ')';
    return os;
}

} // namespace zawa
#line 2 "Src/Template/PairIO.hpp"

#line 2 "Src/Template/TypeAlias.hpp"

#include <cstdint>
#include <cstddef>

namespace zawa {

using i16 = std::int16_t;
using i32 = std::int32_t;
using i64 = std::int64_t;
using i128 = __int128_t;

using u8 = std::uint8_t;
using u16 = std::uint16_t;
using u32 = std::uint32_t;
using u64 = std::uint64_t;

using usize = std::size_t;

} // namespace zawa
#line 4 "Src/Template/PairIO.hpp"

#include <iostream>
#include <utility>

namespace zawa {

template <class T1, class T2>
std::istream &operator>>(std::istream& is, std::pair<T1, T2>& P) {
    is >> P.first >> P.second;
    return is;
}

template <class T1, class T2>
std::ostream &operator<<(std::ostream& os, const std::pair<T1, T2>& P) {
    os << '(' << P.first << ',' << P.second << ')';
    return os;
}

} // namespace zawa
Back to top page