結果
問題 |
No.8061 uxs hxixtya pyuyn ixc hyixa kxuyn
|
ユーザー |
|
提出日時 | 2020-04-01 21:43:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 533 bytes |
コンパイル時間 | 2,148 ms |
コンパイル使用メモリ | 199,312 KB |
最終ジャッジ日時 | 2025-01-09 11:50:53 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 15 WA * 4 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ string S; getline(cin, S); int cnt[300] = {0}; for(char c : S) cnt[c]++; int N = S.size(); for(int i=0; i<N; i++) for(int j=i; j<N; j+=2){ map<char, int> mp; for(int k=i; k<=j; k++) mp[S[k]]++; bool ok = true; for(auto& p : mp) if(p.first == ' ' || cnt[p.first] != p.second) ok = false; if(ok){ cout << "Yes" << endl; return 0; } } cout << "NO" << endl; return 0; }