結果
| 問題 | No.349 干支の置き物 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-22 07:00:22 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 631 ms |
| コンパイル使用メモリ | 88,816 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-28 19:52:40 |
| 合計ジャッジ時間 | 1,558 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
#include <iostream>
#include <map>
using namespace std;
int main(){
int n;cin>>n;
map<string,int> A;
for(int i = 0; n > i; i++){
string s;cin>>s;
A[s]++;
}
for(auto x:A){
if(x.second >= (n+3)/2){
cout << "NO" << endl;
return 0;
}
}
cout << "YES" << endl;
}
//3 3 6
//4 3 7
//5 4 8
//6 4 9