思路
zhan-z
找到你啦
展开
-
letcode32最长有效括号
记录技巧。原创 2020-03-08 11:25:23 · 137 阅读 · 0 评论 -
letcode29两数相除
这题,分类是二分。确实第一时间相出了二分做法,结果是超时的。。。 看了题解,看完实现的时候唉,边界真的不好控制,一言难尽。 先记录一下,明天补思路。 class Solution { public: int divide(int dividend, int divisor) { if(divisor == 0) return 0; bool sign = (...原创 2020-02-28 22:29:52 · 85 阅读 · 0 评论 -
Alice’s Stamps dp+思维
Alice’s Stamps Time Limit: 6000/3000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1921Accepted Submission(s): 690 Problem Description A...原创 2019-11-14 22:53:56 · 438 阅读 · 0 评论 -
Lock Puzzle 思路模拟 比较难想
题目传送门--->传送门 题意:给一种shift的操作,该操作可以自己选择一定长度的后缀,可以说是后缀,翻转选中长度的后缀然后把翻转好的移动到原串的最前面。给你原串和需要换成的串,需要再6200步数内完成翻转。串长最大为2000. 题解:比赛的时候没想出来,由于给了结果和初始串,一开始使劲的往双向bfs上靠,结果随便想想都超时,赛后得知题解。发现可以一个一个把字符都移到后面,然后又得知把...原创 2019-11-01 21:10:42 · 572 阅读 · 0 评论 -
Good Numbers (hard version) 思路
The only difference between easy and hard versions is the maximum value ofnn. You are given a positive integer numbernn. You really lovegood numbersso you want to find the smallestgood numbergr...原创 2019-10-23 20:36:23 · 955 阅读 · 0 评论 -
Alice and the List of Presents div2 Round#593
B. Alice and the List of Presents time limit per test 1 second memory limit per test 256 megabytes input standard input output standard outpu...原创 2019-10-21 10:49:14 · 159 阅读 · 0 评论