結果

問題 No.349 干支の置き物
ユーザー ixmelixmel
提出日時 2016-04-24 07:07:03
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 773 bytes
コンパイル時間 707 ms
コンパイル使用メモリ 81,840 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-04 15:35:08
合計ジャッジ時間 1,347 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
const int inf=1e9;
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
int main(){
	int n;
	cin>>n;
	map<string,int>m;
	rep(i,n){
		string s;
		cin>>s;
		m[s]++;
	}
	int ma=-1;
	for(map<string,int>::iterator it=m.begin();it!=m.end();it++)ma=max(ma,it->second);
	if(ma*2>n)cout<<"NO"<<endl;
	else cout<<"YES"<<endl;
}






0