acgo题库
  • 首页
  • 题库
  • 学习
  • 天梯
  • 备赛

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 资讯
  • 竞赛
  • 讨论
  • 团队
  • 商城
登录
注册
题目详情提交记录(0)
  • ssssssssssss

    #include<bits/stdc++.h> using namespace std; int main(){ int n,k; string s; cin>>n>>k>>s; int cnt[26]={0}, odd=0; for(char c:s) cnt[c-'a']; for(int i=0;i<26;i) if(cnt[i]&1) odd++; if(odd-k<=1) cout<<"YES\n"; else cout<<"NO\n"; return 0; }

    userId_undefined
    ༺ཌༀ༒剑起风止༒ༀ༻
    秩序白银递归·套娃学徒模拟·模拟练习生贪心·贪心尝试者快乐小狗枚举·枚举小能手
    4阅读
    0回复
    0点赞
暂无数据

提交答案之后,这里将显示提交结果~

首页