HBC209384ClassicalStringProblem题解

一点都不欢乐 算法基础篇 52 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
Given a string S consists of lower case letters. You're going to perform Q operations one by one. Each operation can be one of the following two types: Modify: Given an integer x. You need to modify S according to the value of x. If x is positive, move the leftmost x letters in S to the right side of S; otherwise, move the rightmost |x| letters in S to the left side of S. Answer: Given a positive integer x. Please answer what the x-th letter in the current string S is.

Given a string S consists of lower case letters. You're going to perform Q operations one by one. Each operation can be one of the following two types: Modify: Given an integer x. You need to modify S according to the value of x. If x is positive, move the leftmost x letters in S to the right side of S; otherwise, move the rightmost |x| letters in S to the left side of S. Answer: Given a positive integer x. Please answer what the x-th letter in the current string S is.

HBC209384ClassicalStringProblem题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断学习,不断挑战,才能在编程领域中脱颖而出!全网最全C++题库,助您成为编程高手!

标签: HBC209384ClassicalStringProblem题解