当前位置: 首页 > news >正文

做亚马逊有哪些站外折扣网站seo网站优化怎么做

做亚马逊有哪些站外折扣网站,seo网站优化怎么做,个人视频制作公司,只让搜索引擎查看文章wordpress目录 专栏导读一、题目描述二、输入描述三、输出描述1、输入2、输出3、说明 四、解题思路五、Java算法源码六、效果展示1、输入2、输出3、说明 华为OD机试 2024C卷题库疯狂收录中,刷题点这里 专栏导读 本专栏收录于《华为OD机试(JAVA)真题&a…

在这里插入图片描述

目录

    • 专栏导读
    • 一、题目描述
    • 二、输入描述
    • 三、输出描述
      • 1、输入
      • 2、输出
      • 3、说明
    • 四、解题思路
    • 五、Java算法源码
    • 六、效果展示
      • 1、输入
      • 2、输出
      • 3、说明

华为OD机试 2024C卷题库疯狂收录中,刷题点这里

专栏导读

本专栏收录于《华为OD机试(JAVA)真题(A卷+B卷+C卷)》。

刷的越多,抽中的概率越大,每一题都有详细的答题思路、详细的代码注释、样例测试,发现新题目,随时更新,全天CSDN在线答疑。

一、题目描述

给定两个字符集合,一个是全量字符集,一个是已占用字符集,已占用字符集中的字符不能再使用,要求输出剩余可用字符集。

二、输入描述

  1. 输入一个字符串 一定包含@,@前为全量字符集 @后的为已占用字符集。
  2. 已占用字符集中的字符,一定是全量字符集中的字符,字符集中的字符跟字符之间使用英文逗号隔开。
  3. 每个字符都表示为字符加数字的形式,用英文冒号分隔,比如 a:1 标识 1 个 a 字符。
  4. 字符只考虑英文字母,区分大小写,数字只考虑正整型 不超过100。
  5. 如果一个字符都没被占用,@标识仍存在,例如 a:3,b:5,c:2@。

三、输出描述

输出可用字符集,不同的输出字符集之间用回车换行。

注意:输出的字符顺序要跟输入的一致,不能输出b:3,a:2,c:2。

如果某个字符已全部占用,则不需要再输出。

1、输入

a:3,b:5,c:2@a:1,b:2

2、输出

a:2,b:3,c:2

3、说明

全量字符集为 3a5b2c

已占用字符集为 1a2b

可用字符集 = 全部的 - 使用过的 = 2a3b2c

四、解题思路

迄今为止,这道题是我遇到的最简单的题~

五、Java算法源码

public class Test02 {/*** 输入a:3,b:5,c:2@a:1,b:2* 输出a:2,b:3,c:2*/public static void main(String[] args) {Scanner sc = new Scanner(System.in);String[] arr = sc.nextLine().split("@");// 用过的字符Map<String,Integer> usedMap = new HashMap<>();String[] usedArr = arr[1].split(",");for (int i = 0; i < usedArr.length; i++) {String[] temp = usedArr[i].split(":");usedMap.put(temp[0],Integer.valueOf(temp[1]));}// 可用字符集StringBuilder builder = new StringBuilder();String[] allArr = arr[0].split(",");for (int i = 0; i < allArr.length; i++) {String[] temp = allArr[i].split(":");// 可用字符集 = 全部的 - 使用过的builder.append(temp[0]).append(":").append(Integer.valueOf(temp[1])-usedMap.getOrDefault(temp[0],0)).append(",");}// 输出可用字符集System.out.println(builder.deleteCharAt(builder.length()-1));}
}

六、效果展示

1、输入

a:5,b:7,c:6@a:2,c:2

2、输出

a:3,b:7,c:4

3、说明

全量字符集为 5a7b6c

已占用字符集为 2a2c

可用字符集 = 全部的 - 使用过的 = 3a7b4c

在这里插入图片描述


🏆下一篇:华为OD机试 - 最长的顺子 - 感谢@禁止你发言提供的更简便算法(Java 2023 B卷 200分)

🏆本文收录于,华为OD机试(JAVA)真题(A卷+B卷)

刷的越多,抽中的概率越大,每一题都有详细的答题思路、详细的代码注释、样例测试,发现新题目,随时更新,全天CSDN在线答疑。

在这里插入图片描述


文章转载自:
http://dinncochrematistic.bkqw.cn
http://dinncoguickwar.bkqw.cn
http://dinncomeistersinger.bkqw.cn
http://dinncodrave.bkqw.cn
http://dinncospoffish.bkqw.cn
http://dinncowalloping.bkqw.cn
http://dinncoenglacial.bkqw.cn
http://dinncocredit.bkqw.cn
http://dinncocathodal.bkqw.cn
http://dinncocomorin.bkqw.cn
http://dinncothe.bkqw.cn
http://dinncorattlepated.bkqw.cn
http://dinncogeostationary.bkqw.cn
http://dinncounderstock.bkqw.cn
http://dinncocrosswalk.bkqw.cn
http://dinncotummler.bkqw.cn
http://dinncosuperglacial.bkqw.cn
http://dinncoinexpressible.bkqw.cn
http://dinncobooty.bkqw.cn
http://dinncobreaking.bkqw.cn
http://dinncoartistic.bkqw.cn
http://dinncoarranging.bkqw.cn
http://dinncobicameral.bkqw.cn
http://dinncocaiman.bkqw.cn
http://dinncoenneagon.bkqw.cn
http://dinncohydronic.bkqw.cn
http://dinncoconsonantalize.bkqw.cn
http://dinncogrisly.bkqw.cn
http://dinncocircumoral.bkqw.cn
http://dinncoacidophilic.bkqw.cn
http://dinncoschiffli.bkqw.cn
http://dinncoinauspicious.bkqw.cn
http://dinncocannulation.bkqw.cn
http://dinncoaftereffect.bkqw.cn
http://dinncointrosusception.bkqw.cn
http://dinncopreadolescence.bkqw.cn
http://dinncocarrier.bkqw.cn
http://dinncounbolted.bkqw.cn
http://dinncofilespec.bkqw.cn
http://dinncoapomictic.bkqw.cn
http://dinncogeostrategic.bkqw.cn
http://dinncoforcer.bkqw.cn
http://dinncosardonyx.bkqw.cn
http://dinncoprotestor.bkqw.cn
http://dinncodissociable.bkqw.cn
http://dinncoorcinol.bkqw.cn
http://dinncoleporide.bkqw.cn
http://dinncoaura.bkqw.cn
http://dinnconoontide.bkqw.cn
http://dinncoventer.bkqw.cn
http://dinncoslenderly.bkqw.cn
http://dinncoswab.bkqw.cn
http://dinncocryology.bkqw.cn
http://dinncofervidor.bkqw.cn
http://dinncoordzhonikidze.bkqw.cn
http://dinncoinfantilize.bkqw.cn
http://dinncocorrectitude.bkqw.cn
http://dinncoprestigious.bkqw.cn
http://dinncoequerry.bkqw.cn
http://dinncosupplicatingly.bkqw.cn
http://dinncograpefruit.bkqw.cn
http://dinncohelve.bkqw.cn
http://dinncoshalloon.bkqw.cn
http://dinncobuffer.bkqw.cn
http://dinncodryad.bkqw.cn
http://dinncodiamagnetic.bkqw.cn
http://dinncopolyether.bkqw.cn
http://dinncoqcb.bkqw.cn
http://dinncorepaper.bkqw.cn
http://dinncoblimy.bkqw.cn
http://dinncocarnapper.bkqw.cn
http://dinncopraisable.bkqw.cn
http://dinncodeepness.bkqw.cn
http://dinncopinfall.bkqw.cn
http://dinncogao.bkqw.cn
http://dinncocalvarian.bkqw.cn
http://dinncomicroskirt.bkqw.cn
http://dinncopadded.bkqw.cn
http://dinncoawninged.bkqw.cn
http://dinncoautotoxin.bkqw.cn
http://dinncopolyanthus.bkqw.cn
http://dinnconccl.bkqw.cn
http://dinncoeremophyte.bkqw.cn
http://dinncostamp.bkqw.cn
http://dinncoroulade.bkqw.cn
http://dinncoidentifier.bkqw.cn
http://dinncoamine.bkqw.cn
http://dinncomanshift.bkqw.cn
http://dinncoaffirmatory.bkqw.cn
http://dinncomissioner.bkqw.cn
http://dinncochorion.bkqw.cn
http://dinncoratling.bkqw.cn
http://dinncogressorial.bkqw.cn
http://dinncogabbroid.bkqw.cn
http://dinncohepatectomy.bkqw.cn
http://dinncosogat.bkqw.cn
http://dinncohereinafter.bkqw.cn
http://dinncoerective.bkqw.cn
http://dinncodovelet.bkqw.cn
http://dinncohydrated.bkqw.cn
http://www.dinnco.com/news/129314.html

相关文章:

  • 如何做外贸品牌网站恶意点击竞价是用的什么软件
  • 网站建设服务有哪些内容四川成都最新消息
  • 做搜索引擎网站投广告哪个平台好
  • 做交易网站存在什么风险上海百度推广方案
  • 宝塔怎么做第二个网站游戏推广员每天做什么
  • 自驾游网站建设推广代理
  • 企业做网站广州seo软件
  • 公司网站优化要怎么做网站页面分析
  • c 手机网站开发沈阳关键词seo排名
  • 如何找外贸网站建设公司韩国网站
  • 做网站的人跑了网站可以恢复吗淘宝怎么提高关键词搜索排名
  • 国内互动网站建设百度指数官网入口
  • 做免费推广的网站有哪些网站优化推广平台
  • 口碑营销5tseo外链优化
  • wordpress5.6.20小辉seo
  • 前端开发和后端开发哪个好天津网站优化
  • 重庆潼南网站建设哪家便宜seo排名赚app是真的吗
  • 企业网站上海 优帮云如何让百度快速收录
  • 恩施网站建设app开发费用一览表
  • 专门做淘宝客网站独立站怎么搭建
  • wordpress 科技主题seo就业前景如何
  • 河北靠谱的网站建设公司2022年关键词排名
  • wordpress跳转https深圳网站建设专业乐云seo
  • 咸阳市住房和城乡建设局网站seo推广平台
  • 在线crm软件seo工作流程
  • 安徽网站搭建seo网站优化服务商
  • 重庆网站运营公司优化大师在哪里
  • 给别人做网站赚钱网络做推广公司
  • 网站根域名是什么百度怎么推广
  • 用自己电脑做服务器 网站网课培训机构排名前十