文章

82

粉丝

343

获赞

27

访问

661.4k

头像
WPL结论
P1562
发布于2021年1月31日 20:32
阅读数 8.2k

#include <iostream>
#include <stdio.h>
#include <string>
#include <queue>
#include <map>
#include <iterator>
using namespace std;
// 利用结论  非叶子节点结点值的和等于WPL  不用一个个计算
int main()
{
    string s;
    while(cin>>s)
    {
        if(s == "END")
            break;
        else
        {
            map<char,int> m;
            for(int i=0;i<s.length();i++)
                m[s[i]]++;
            map<char,int>::iterator it;
            priority_queue<int,vector<int>,greater&l...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发