結果
| 問題 |
No.349 干支の置き物
|
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2016-03-11 22:22:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 375 bytes |
| コンパイル時間 | 684 ms |
| コンパイル使用メモリ | 68,056 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-25 00:54:53 |
| 合計ジャッジ時間 | 1,894 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 3 |
ソースコード
#include<iostream>
#include<string>
#include<map>
int main() {
int n;
std::cin >> n;
std::map<std::string, int> m;
for (int i = 0; i < n; i++) {
std::string s;
std::cin >> s;
m[s]++;
}
for (auto i = m.begin(); i != m.end(); i++) {
if (i->second > n / 2) {
std::cout << "NO" << std::endl;
return 0;
}
}
std::cout << "YES" << std::endl;
return 0;
}
hanorver