結果

問題 No.349 干支の置き物
ユーザー arrows
提出日時 2016-06-02 03:35:06
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 377 bytes
コンパイル時間 1,747 ms
コンパイル使用メモリ 176,216 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-08 05:20:29
合計ジャッジ時間 2,947 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int N;
    cin >> N;
    map<string, int> cnt;
    for (int i = 0; i < N; i++) {
        string s;
        cin >> s;
        cnt[s]++;
    }
    bool poss = 1;
    for (auto &x: cnt) {
        if (x.second > N/2) {
            poss = 0;
        }
    }
    cout << (poss ? "YES" : "NO") << endl;
    return 0;
}
0