657
  • 2024-07-12力扣 657. 机器人能否返回原点
    题目内容在二维平面上,有一个机器人从原点 (0,0) 开始。给出它的移动顺序,判断这个机器人在完成移动后是否在 (0,0) 处结束。移动顺序由字符串 moves 表示。字符 move[i] 表示其第 i 次移动。机器人的有效动作有 R(右),L(左),U(上)和 D(下)。如果机器人在完成所有动作后返
  • 2023-05-30leetcode 657. Judge Route Circle
    Initially,thereisaRobotatposition(0,0).Givenasequenceofitsmoves,judgeifthisrobotmakesacircle,whichmeansitmovesbackto theoriginalplace.Themovesequenceisrepresentedbyastring.Andeachmoveisrepresentbyacharacter.The
  • 2023-02-03Codeforces Round #657 (Div. 2)
    A.AcaciusandString题意:给你一个串,你可以把换成任意字符,使得这个串最后只出现一次暴力枚举AC代码:strings;intn;stringT="abacaba";boolcheck(string&a){int
  • 2023-01-05leetcode-657. 机器人能否返回原点
    657.机器人能否返回原点-力扣(Leetcode)刚开始用了个map,比较复杂,后来看了答案,按照这种简单的方式,并且做了len(moves)%2!=0的判断funcjudgeCircle(movesstring
  • 2022-11-04leetcode-657-easy
    RobotReturntoOriginThereisarobotstartingattheposition(0,0),theorigin,ona2Dplane.Givenasequenceofitsmoves,judgeifthisrobotendsup