Shine_YP
码龄5年
关注
提问 私信
  • 博客:10,157
    10,157
    总访问量
  • 35
    原创
  • 880,215
    排名
  • 3
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:上海市
  • 加入CSDN时间: 2020-05-25
博客简介:

m0_48118006的博客

查看详细资料
个人成就
  • 获得2次点赞
  • 内容获得0次评论
  • 获得5次收藏
创作历程
  • 29篇
    2022年
  • 6篇
    2021年
成就勋章
TA的专栏
  • PAT甲级C++题解
    28篇
  • PAT甲级
    6篇
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

2022年春华为机试

新人考试(100分)有10道2分题,10道4分题,5道8分题,满分100分,答对得分,答错不得分,累计错三道则停止作答结算分数输入n分输出作答情况的数量m#include<bits/stdc++.h>using namespace std;// we have defined the necessary header files here for this problem.// If additional header files are needed in your p
原创
发布博客 2022.04.20 ·
841 阅读 ·
0 点赞 ·
0 评论 ·
4 收藏

1046 Shortest Distance (20 分)

The task is really simple: givenNexits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file contains one test case. For each case, the first line contain..
原创
发布博客 2022.03.09 ·
133 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1042 Shuffling Machine (20 分)

Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gamblers by performing inadequate shuffles, many casinos employ
原创
发布博客 2022.03.08 ·
177 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1041 Be Unique (20 分)

Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,104]. The first one who bets on a unique number wins. For example, if there are 7 people
原创
发布博客 2022.03.07 ·
144 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1035 Password (20 分)

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish1(one) froml(Lin lowercase), or0(zero) fromO(oin uppercase). One ...
原创
发布博客 2022.03.07 ·
133 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1031 Hello World for U (20 分)

Given any string ofN(≥5) characters, you are asked to form the characters into the shape ofU. For example,helloworldcan be printed as:h de ll rlowoThat is, the characters must be printed in the original order, starting top-down from the le...
原创
发布博客 2022.02.24 ·
347 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1027 Colors in Mars (20 分)

People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are forRed, the middle 2 digits forGreen, and the last 2 digits forBlue. The only ...
原创
发布博客 2022.02.24 ·
324 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1023 Have Fun with Numbers (20 分)

Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number consisting exactly the numbers from 1 to 9, only in a diffe
原创
发布博客 2022.02.17 ·
332 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

1021 Deepest Root (25 分)

A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root is calledthe deepest root.Input Specification:Each .
原创
发布博客 2022.02.17 ·
187 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1020 Tree Traversals (25 分)

Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the corresponding binary tree.Input Specification:Each inpu
原创
发布博客 2022.02.16 ·
312 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1019 General Palindromic Number (20 分)

A number that will be the same when it is written forwards or backwards is known as aPalindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers.Although palindromic numbers are most often considere.
原创
发布博客 2022.02.15 ·
156 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1018 Public Bike Management (30 分)

There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the city.The Public Bike Management Center (PBMC) keeps mo
原创
发布博客 2022.02.15 ·
470 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

1017 Queueing at Bank (25 分)

Suppose a bank hasKwindows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow line, until it is his/her turn to be served and there is a..
原创
发布博客 2022.02.15 ·
132 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1016 Phone Bills (25 分)

A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When a customer starts connecting a long-distance call, the
原创
发布博客 2022.02.14 ·
193 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1010 Radix (25 分)

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integersN1​andN2​, your task is to find the radix of one ...
原创
发布博客 2022.02.14 ·
166 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1015 Reversible Primes (20 分)

Areversible primein any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a prime.Now given any two positive integersN(<105) an...
原创
发布博客 2022.02.14 ·
301 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1014 Waiting in Line (30 分)

Suppose a bank hasNwindows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space inside the yellow line in front of each window is enoug..
原创
发布博客 2022.02.14 ·
239 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1013 Battle Over Cities (25 分)

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other highways to keep the rest of the c
原创
发布博客 2022.02.12 ·
175 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1012 The Best Rank (25 分)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only:C- C Programming Language,M- Mathematics (Calculus or Linear Algrbra), andE- English. At the mean time, we encourage students by emphasi...
原创
发布博客 2022.02.12 ·
334 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1011 World Cup Betting (20 分)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting fans were putting their money
原创
发布博客 2022.02.12 ·
173 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多