結果
| 問題 |
No.2714 Amaou
|
| コンテスト | |
| ユーザー |
Gandalfr
|
| 提出日時 | 2024-04-05 21:33:41 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 5,276 bytes |
| コンパイル時間 | 2,986 ms |
| コンパイル使用メモリ | 255,488 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-01 01:47:01 |
| 合計ジャッジ時間 | 3,910 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 |
ソースコード
#line 1 "freespace/main.cpp"
#include <bits/stdc++.h>
#line 2 "library/gandalfr/types.hpp"
#line 5 "library/gandalfr/types.hpp"
namespace gandalfr {
using i8 = __int8_t;
using i16 = __int16_t;
using i32 = __int32_t;
using i64 = __int64_t;
using i128 = __int128_t;
using u8 = __uint8_t;
using u16 = __uint16_t;
using u32 = __uint32_t;
using u64 = __uint64_t;
using u128 = __uint128_t;
constexpr i8 IMAX8 = INT8_MAX;
constexpr i16 IMAX16 = INT16_MAX;
constexpr i32 IMAX32 = INT32_MAX;
constexpr i64 IMAX64 = INT64_MAX;
constexpr i8 IMIN8 = INT8_MIN;
constexpr i16 IMIN16 = INT16_MIN;
constexpr i32 IMIN32 = INT32_MIN;
constexpr i64 IMIN64 = INT64_MIN;
constexpr u8 UMAX8 = UINT8_MAX;
constexpr u16 UMAX16 = UINT16_MAX;
constexpr u32 UMAX32 = UINT32_MAX;
constexpr u64 UMAX64 = UINT64_MAX;
constexpr i64 MOD998 = 998244353;
constexpr i64 MOD107 = 1000000007;
constexpr double PI = M_PI;
const i32 INF = 1001001001;
const i64 INFLL = 1001001001001001001;
#define rep(i, j, n) for (i64 i = (i64)(j); i < (i64)(n); i++)
#define rrep(i, j, n) for (i64 i = (i64)(n - 1); i >= (i64)(j); i--)
#define all(a) (a).begin(), (a).end()
#define LF cout << endl
template <typename T> void print_debug(T t) { std::cerr << t << std::endl; }
template <typename First, typename... Rest>
void print_debug(First parm1, Rest... parm) {
std::cerr << parm1 << ", ", print_debug(parm...);
}
#define debug(...) \
{ \
std::cerr << #__VA_ARGS__ << ": "; \
print_debug(__VA_ARGS__); \
}
template <typename T> inline bool chmax(T &a, const T &b) {
return a < b && (a = b, true);
}
template <typename T> inline bool chmin(T &a, const T &b) {
return a > b && (a = b, true);
}
template <typename Key, typename Value>
inline bool map_chmax(std::map<Key, Value> &mp, const Key &a, const Value &b) {
auto it = mp.find(a);
return it == mp.end() ? (mp[a] = b, true) : chmax(it->second, b);
}
template <typename Key, typename Value>
inline bool map_chmin(std::map<Key, Value> &mp, const Key &a, const Value &b) {
auto it = mp.find(a);
return it == mp.end() ? (mp[a] = b, true) : chmin(it->second, b);
}
void Yes(bool ok) { std::cout << (ok ? "Yes" : "No") << std::endl; }
} // namespace gandalfr
#line 10 "library/gandalfr/other/io.hpp"
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::vector<T> &v) {
for (size_t i = 0; i < v.size(); ++i) {
os << v[i] << (i + 1 != v.size() ? " " : "");
}
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::set<T> &st) {
for (auto it = st.begin(); it != st.end(); ++it) {
os << *it << (std::next(it) != st.end() ? " " : "");
}
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::multiset<T> &st) {
for (auto it = st.begin(); it != st.end(); ++it) {
os << *it << (std::next(it) != st.end() ? " " : "");
}
return os;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &os, const std::pair<T1, T2> &p) {
os << '(' << p.first << ", " << p.second << ')';
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, std::queue<T> q) {
while (!q.empty()) {
os << q.front() << (q.size() > 1 ? " " : "");
q.pop();
}
return os;
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::deque<T> &dq) {
for (size_t i = 0; i < dq.size(); ++i) {
os << dq[i] << (i + 1 != dq.size() ? " " : "");
}
return os;
}
template <typename Tp, typename Sequence, typename Compare>
std::ostream &operator<<(std::ostream &os,
std::priority_queue<Tp, Sequence, Compare> q) {
while (!q.empty()) {
os << q.top() << (q.size() > 1 ? " " : "");
q.pop();
}
return os;
}
template <typename Key, typename T>
std::ostream &operator<<(std::ostream &os, const std::map<Key, T> &m) {
for (auto it = m.begin(); it != m.end(); ++it) {
os << *it << (std::next(it) != m.end() ? " " : "");
}
return os;
}
template <typename Key, typename T>
std::ostream &operator<<(std::ostream &os,
const std::unordered_map<Key, T> &um) {
for (auto it = um.begin(); it != um.end(); ++it) {
os << *it << (std::next(it) != um.end() ? " " : "");
}
return os;
}
///////////////////// input /////////////////////
template <typename T>
std::istream &operator>>(std::istream &is, std::vector<T> &v) {
for (T &in : v)
is >> in;
return is;
}
template <typename T1, typename T2>
std::istream &operator>>(std::istream &is, std::pair<T1, T2> &p) {
is >> p.first >> p.second;
return is;
}
#line 4 "freespace/main.cpp"
using namespace std;
using namespace gandalfr;
int main(void) {
i32 N;
cin >> N;
i32 ans = 0;
rep(i,0,N) {
vector<string> S(4);
cin >> S;
sort(all(S));
if (S[0] == "akai" && S[1] == "marui" && S[2] == "okii" && S[3] == "umai") ans++;
}
cout << ans << endl;
}
Gandalfr