結果

問題 No.349 干支の置き物
ユーザー suibaka_ku
提出日時 2017-03-03 10:23:47
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 327 bytes
コンパイル時間 861 ms
コンパイル使用メモリ 77,384 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-22 04:41:45
合計ジャッジ時間 1,966 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>
using namespace std;

int main() {
    int N; cin >> N;
    int ma = 0;
    map<string, int> m;
    for(int i=0; i<N; ++i) {
        string a; cin >> a;
        ma = max(ma, ++m[a]);
    }
    if(ma > N / 2) {
        cout << "NO" << endl;
    } else {
        cout << "YES" << endl;
    }
}
0