結果
問題 | No.2714 Amaou |
ユーザー |
![]() |
提出日時 | 2024-04-05 21:24:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 695 bytes |
コンパイル時間 | 2,182 ms |
コンパイル使用メモリ | 201,576 KB |
最終ジャッジ日時 | 2025-02-20 20:45:20 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
#include <bits/stdc++.h>using namespace std;vector<string> v = {"akai", "marui", "okii", "umai"};int main() {int n;cin >> n;vector<vector<string>> s(n, vector<string>(4));for (int i = 0; i < n; i++) {for (int j = 0; j < 4; j++) {cin >> s[i][j];}}int ans = 0;for (int i = 0; i < n; i++) {vector<int> ok(4);for (int j = 0; j < 4; j++) {for (int k = 0; k < 4; k++) {if (s[i][j] == v[k]) {ok[k] = 1;}}}if (accumulate(ok.begin(), ok.end(), 0) == 4) {ans++;}}cout << ans << endl;}