結果
問題 | No.349 干支の置き物 |
ユーザー |
![]() |
提出日時 | 2017-02-08 00:47:41 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 1,766 ms |
コンパイル使用メモリ | 167,380 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 15:35:34 |
合計ジャッジ時間 | 3,154 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { map<string,int> m; int n; cin>>n; string s[n]; for (int i = 0; i < n; ++i) { cin>>s[i]; m[s[i]]++; } int mm=0; for (int i = 0; i < n; ++i) { mm=max(mm,m[s[i]]); } cout<<(ceil(n/2)<mm?"NO":"YES")<<endl; }