結果
| 問題 | No.349 干支の置き物 | 
| コンテスト | |
| ユーザー |  nabla_delta | 
| 提出日時 | 2019-10-05 00:54:20 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 499 bytes | 
| コンパイル時間 | 1,640 ms | 
| コンパイル使用メモリ | 169,936 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-04 02:19:28 | 
| 合計ジャッジ時間 | 2,649 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 WA * 3 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
string s[]={"ne", "ushi", "tora", "u", "tatsu", "mi", "uma", "hitsuji", "saru", "tori", "inu", "i"};
int main(){
	int n;
	cin >> n;
	vector<int> cnt(12, 0);
	for(int i=0; i<n; i++){
		string t;
		cin >> t;
		for(int j=0; j<12; j++){
			if(t==s[j]) cnt[j]++;
		}
	}
	int m=0;
	for(int i=0; i<12; i++) m=max(m, cnt[i]);
	if(m>=n/2+1) cout << "NO" << endl;
	else cout << "YES" << endl;
	return 0;
}
            
            
            
        