結果

問題 No.2997 Making YuzuKizu
ユーザー 2qbingxuan
提出日時 2024-12-22 03:09:47
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 3,203 ms
コンパイル使用メモリ 245,516 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-22 03:09:51
合計ジャッジ時間 4,125 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 3 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

signed main() {
	string s;
	cin >> s;
	for (bool first = true; string p : {"yukari"s, "akari"s, "yuzukizu"s}) {
		char f[256], z[256];
		for (char c : p) f[c] += 1;
		for (char c : s) z[c] += 1;
		int ans = 1e9;
		for (int i = 0; i < 256; i++)
			if (f[i])
				ans = min(ans, z[i] / f[i]);
		if (!first)
			cout << ' ';
		first = false;
		cout << ans;
	}
}
0