The government of a small but important country has decided that the alphabet needs to be streamline - 免费下载

数据结构资源 文件大小:3 K

📋 资源详细信息

文件格式
RAR
所属分类
上传用户
上传时间
文件大小
3 K
所需积分
2 积分
推荐指数
⭐⭐⭐⭐⭐ (5/5)

💡 温馨提示:本资源由用户 wangcong200500 上传分享,仅供学习交流使用。如有侵权,请联系我们删除。

资源简介

The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition

源码文件列表

📂 共 1 个源码文件 点击文件名可在线查看源代码

1 📄
规则3.cpp
大小: 3.49 KB
查看源码
💡
温馨提示:点击文件名或"查看源码"按钮可在线浏览源代码,支持语法高亮显示。

立即下载此资源

提示:下载后请用压缩软件解压,推荐使用 WinRAR 或 7-Zip

资源说明

📥 下载说明

  • 下载需消耗 2积分
  • 24小时内重复下载不扣分
  • 支持断点续传
  • 资源永久有效

📦 使用说明

  • 下载后用解压软件解压
  • 推荐 WinRAR 或 7-Zip
  • 如有密码请查看说明
  • 解压后即可使用

🎁 积分获取

  • 上传资源获得积分
  • 每日签到免费领取
  • 邀请好友注册奖励
  • 查看详情 →

相关标签

点击标签查看更多相关资源:

相关资源推荐