結果
問題 |
No.349 干支の置き物
|
ユーザー |
![]() |
提出日時 | 2022-08-28 16:11:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 2,004 ms |
コンパイル使用メモリ | 201,040 KB |
最終ジャッジ日時 | 2025-02-06 22:22:54 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int N; cin>>N; map<string,int> m; for(int i=0;i<N;i++){ string s; cin>>s; m[s]++; } for(auto x:m){ if((N-1)/2+1 < x.second){ cout<<"NO"<<endl; return 0; } } cout<<"YES"<<endl; }