結果
| 問題 | 
                            No.349 干支の置き物
                             | 
                    
| コンテスト | |
| ユーザー | 
                             hogeover30
                         | 
                    
| 提出日時 | 2016-05-18 23:03:29 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 303 bytes | 
| コンパイル時間 | 877 ms | 
| コンパイル使用メモリ | 76,544 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-06 05:43:56 | 
| 合計ジャッジ時間 | 2,148 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 WA * 3 | 
ソースコード
#include <iostream>
#include <string>
#include <map>
using namespace std;
int main()
{
    int n; cin>>n;
    map<string, int> cnt;
    bool ok=true;
    for(int i=0; i<n; ++i) {
        string t; cin>>t;
        ++cnt[t];
        if (2*cnt[t]>n) ok=false;
    }
    cout<<(ok ? "YES" : "NO")<<endl;
}
            
            
            
        
            
hogeover30