結果

問題 No.349 干支の置き物
ユーザー horiesiniti
提出日時 2016-05-25 11:58:28
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 1,016 ms
コンパイル使用メモリ 68,364 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-07 14:04:13
合計ジャッジ時間 2,492 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 24 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include<iostream>
#include<map>
#include<string>
using namespace std;

int main(){
	string str;
	int n;
	cin>>n;
	n=n/2+n%2;
	map<string,int> cs;
	bool ok=true;
	for(int i=0;i<n;i++){
		cin>>str;
		cs[str]++;
		if(cs[str]>n)ok=false;
	}
	cout<<(ok?"YES":"NO")<<"\n";
}
0