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: Test/AtCoder/abc295_a.test.cpp

Depends on

Code

#define PROBLEM "https://atcoder.jp/contests/abc295/tasks/abc295_a"

#include "../../Src/Template/TypeAlias.hpp"
#include "../../Src/Template/Input.hpp"
#include "../../Src/Template/YesNo.hpp"

using namespace zawa;

#include <set>
#include <string>

int main() {
    SetAtCoderYesNo();
    u32 N; input(N);
    std::set<std::string> st{ "and", "not", "that", "the", "you" };
    bool ans{};
    for (u32 _{} ; _ < N ; _++) {
        std::string w; input(w);
        ans |= st.count(w);
    }
    YesNo(ans);
}
#line 1 "Test/AtCoder/abc295_a.test.cpp"
#define PROBLEM "https://atcoder.jp/contests/abc295/tasks/abc295_a"

#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 2 "Src/Template/Input.hpp"

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

#line 4 "Src/Template/ArrayIO.hpp"

#include <iostream>
#include <array>

namespace zawa {

template <class T, usize N>
std::istream &operator>>(std::istream& is, std::array<T, N>& A) {
    for (T& a : A) {
        is >> a;
    }
    return is;
}

template <class T, usize N>
std::ostream &operator<<(std::ostream& os, const std::array<T, N>& A) {
    for (u32 i{} ; i < A.size() ; i++) {
        os << A[i] << (i + 1 == A.size() ? "" : " ");
    }
    return os;
}

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

#line 4 "Src/Template/VectorIO.hpp"

#line 6 "Src/Template/VectorIO.hpp"
#include <vector>

namespace zawa {

template <class T>
std::istream &operator>>(std::istream& is, std::vector<T>& A) {
    for (T& a : A) {
        is >> a;
    }
    return is;
}

template <class T>
std::ostream &operator<<(std::ostream& os, const std::vector<T>& A) {
    for (u32 i{} ; i < A.size() ; i++) {
        os << A[i] << (i + 1 == A.size() ? "" : " ");
    }
    return os;
}

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

#line 4 "Src/Template/PairIO.hpp"

#line 6 "Src/Template/PairIO.hpp"
#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 6 "Src/Template/Input.hpp"

#line 8 "Src/Template/Input.hpp"

namespace zawa {

template <class T>
void input(T& value) {
    std::cin >> value;
}

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

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

#include <string>
#line 5 "Src/Template/YesNo.hpp"

namespace zawa {

namespace internal {

std::string yes{"Yes"};
std::string no{"No"};

} // namespace internal

void YesNo(bool answer) {
    std::cout << (answer ? internal::yes : internal::no) << std::endl;
}

void SetYes(const std::string& yes) {
    internal::yes = yes;
}

void SetNo(const std::string& no) {
    internal::no = no;
}

void SetAtCoderYesNo() {
    SetYes("Yes");
    SetNo("No");
}

void SetCodeforcesYesNo() {
    SetYes("YES");
    SetNo("NO");
}

} // namespace zawa
#line 6 "Test/AtCoder/abc295_a.test.cpp"

using namespace zawa;

#include <set>
#line 11 "Test/AtCoder/abc295_a.test.cpp"

int main() {
    SetAtCoderYesNo();
    u32 N; input(N);
    std::set<std::string> st{ "and", "not", "that", "the", "you" };
    bool ans{};
    for (u32 _{} ; _ < N ; _++) {
        std::string w; input(w);
        ans |= st.count(w);
    }
    YesNo(ans);
}
Back to top page