結果
| 問題 |
No.2714 Amaou
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-05 21:22:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 813 bytes |
| コンパイル時間 | 2,269 ms |
| コンパイル使用メモリ | 204,760 KB |
| 最終ジャッジ日時 | 2025-02-20 20:42:45 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:17:24: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
17 | freopen("KEK.inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
main.cpp:18:24: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
18 | freopen("KEK.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
#if __cplusplus < 202002L
template <class T> int ssize(const T& a){ return a.size(); }
#endif
template <class T1, class T2> istream& operator>> (istream& in, pair <T1, T2>& a){ in >> a.first >> a.second; return in; }
template <class T> istream& operator>> (istream& in, vector <T>& a){ for (auto &x: a){ in >> x; } return in; }
using ll = long long;
using ld = long double;
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
if (fopen("KEK.inp", "r")){
freopen("KEK.inp", "r", stdin);
freopen("KEK.out", "w", stdout);
}
vector <string> a = {"akai", "marui", "okii", "umai"};
int n;
cin >> n;
int ans = 0;
while (n--){
vector <string> b(4);
cin >> b;
sort(begin(b), end(b));
if (a == b){
ans++;
}
}
cout << ans << "\n";
}