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