結果
問題 |
No.349 干支の置き物
|
ユーザー |
![]() |
提出日時 | 2016-05-25 12:00:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 292 bytes |
コンパイル時間 | 667 ms |
コンパイル使用メモリ | 68,512 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 07:33:29 |
合計ジャッジ時間 | 1,667 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include <stdio.h> #include<iostream> #include<map> #include<string> using namespace std; int main(){ string str; int n; cin>>n; int m=n/2+n%2; map<string,int> cs; bool ok=true; for(int i=0;i<n;i++){ cin>>str; cs[str]++; if(cs[str]>m)ok=false; } cout<<(ok?"YES":"NO")<<"\n"; }