結果
| 問題 |
No.349 干支の置き物
|
| コンテスト | |
| ユーザー |
はまやんはまやん
|
| 提出日時 | 2016-05-14 14:39:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 399 bytes |
| コンパイル時間 | 1,889 ms |
| コンパイル使用メモリ | 174,480 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 07:32:10 |
| 合計ジャッジ時間 | 2,781 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
int n;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
map<string, int> _map;
rep(i, 0, n)
{
string A; cin >> A;
_map[A]++;
}
int _max = 0;
for (auto &&p : _map)
{
_max = max(_max, p.second);
}
if ((n + 1) / 2 < _max)
cout << "NO" << endl;
else
cout << "YES" << endl;
}
はまやんはまやん