結果
| 問題 | 
                            No.349 干支の置き物
                             | 
                    
| コンテスト | |
| ユーザー | 
                             41Toame
                         | 
                    
| 提出日時 | 2018-02-22 19:46:21 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 993 bytes | 
| コンパイル時間 | 1,436 ms | 
| コンパイル使用メモリ | 161,500 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-02 09:19:31 | 
| 合計ジャッジ時間 | 1,937 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 WA * 3 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i,n) for( int i = 0; i < n; i++ )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N; cin >> N;
    int cnt[12] = {};
    rep(i, N) {
        string S; 
        cin >> S;
        if (S == "ne") cnt[0]++;
        if (S == "ushi") cnt[1]++;
        if (S == "u") cnt[2]++;
        if (S == "tatsu") cnt[3]++;
        if (S == "mi") cnt[4]++;
        if (S == "uma") cnt[5]++;
        if (S == "hitsuji") cnt[6]++;
        if (S == "saru") cnt[7]++;
        if (S == "tori") cnt[8]++;
        if (S == "inu") cnt[9]++;
        if (S == "i") cnt[10]++;
        if (S == "tora") cnt[11]++;
    }
    sort(cnt, cnt+12, greater<int>());
    if (cnt[0] > N/2) {
        cout << "NO" << endl;
    } else {
        cout << "YES" << endl;
    }
    return 0;
}
            
            
            
        
            
41Toame