2018年5月21日

2018.5.18转职服务器开发

终于……成功转职了

2018年3月30日

又一年……

这一年里,领证了,遇到了一只跑进家门的小黑猫并领养了,开始做开发的活了,走了一个高中同寝室的好友,开始学钢琴了,……

2017年4月25日

开始学Golang

新开了https://github.com/cittie/Leetcode---Go

对于我来说,学Golang刷题反而会更快吧。

今天刷了两题,继续……

2017年4月5日

首个网站发布完毕!

第一个项目算是完成了,阴阳师悬赏任务查询,可以查4个任务怪的出现关卡,以及哪些关包括了两个以上的任务怪。

用的是Flask加亚马逊EC2,域名在Godaddy买的。

目前用的临时ip地址http://13.113.70.177 ,过两天yysdata.com就能解析成功了。

获益良多,哇哈哈哈。

下一步是继续做功能了。目前想到的功能如下:

式神定位(控速、控火、肉、控制、后手、输出)
式神常用御魂及出处
特效触发计算


2017年3月30日

啊,堕落的三月……

似乎玩的时间越来越多了……

2017年1月4日

Leetcode进度:141/448

目前做完的解题集:https://github.com/cittie/Leetcode---Python

继续努力吧……

2016年12月27日

390. Elimination Game - I really didn't expect it working so perfect

最开始的时候,我写的代码是这样的:
nums = range(n, 0, -1)

while len(nums) > 1:
    nums = nums[-2::-2]

毫无疑问,虽然答案对了,但是内存爆了。

于是搜了下其他人的答案,知道了思路是找左右点。然后有了下面的代码:
left, length ,step = 1, n, 1
right = left + (n - 1) * step

while length > 1:
    left += step        # Drop the first
    step <<= 1
    length >>= 1
    right = left + (length - 1) * step          # Get the right point.

    left, right = right, left
    step = ~step + 1

扔到PyCharm里调试,并和上面那个结果做Assert,居然完美通过,然后我就木凳狗带了——妈蛋我自己都只有个大概思路就撸了啊,没想到居然没什么错,这和我一贯以来20%的通过率不符啊……


2016年12月1日

312. Burst Balloons 继续趟pytho的坑……

这次被坑的是初始化二维数组……

[[0] * size] * size != [[0] * size for i in range(size)] == [[0 for i in range(size)] for i in range(size)]

然后读了读 http://ars.me/programming/2014/06/14/py-listmul/ 妥了……

2016年11月30日

花了差不多一下午补DP相关的东西,终于勉强做完了377. Combination Sum IV

在思路上绕了好久,最后还是没解决,忍不住去搜索了。然后发现是自己不擅长的DP,花了差不多整个下午,终于能勉强答题了。

class Solution(object):
    def combinationSum4(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        dp = [1] + [0] * target
        
        for i in range(target + 1):
            for num in nums:
                if i + num <= target:
                    dp[i + num] += dp[i]
        
        return dp[target]

答完题回来看看,似乎确实不难啊……

2016年11月17日

378. Kth Smallest Element in a Sorted Matrix的附带收获

神之多重list展开:

matrix_expanded = [element for line in matrix for element in line]

这很Python,写了两个for循环的我给跪了……

2016年11月9日

406. Queue Reconstruction by Height 的Python解法

研究了好久算法,最后参考了别人的思路,才发现代码可以这么简单……

思路总结:
1. 预排序,h从大到小,k从小到大
2. 依次把每个元素插到新list的k位置

class Solution(object):
    def reconstructQueue(self, people):
        """
        :type people: List[List[int]]
        :rtype: List[List[int]]
        """
        result = []
        
        people.sort(key = operator.itemgetter(1))
        people.sort(key = operator.itemgetter(0), reverse = True)
        
        for p in people:
            result.insert(p[1], p)
            
        return result

这样的思路实现起来,真的很简单啊!

2016年10月18日

脱单5个月

军团远征已开。
已经在Kabam上班3个月。
国庆长假已经过去。

还是感觉很幸福。

2016年5月18日

2016.5.17,脱单

ღ(๑╯◡╰๑ღ)

2016年4月28日

更新后的工作经历

2007.9.12 - 2012.4.27 Gameloft 智乐软件
2012.8.20 - 2012.9.6 Beyond Soft 博彦科技
2012.10.8 - 2013.4.24 Dreamingame 追梦创新
2013.6.26 - 2013.12.12 Renren Games 人人游戏
2013.12.16 - 2016.4.27 Glu mobile 格融科技

2016年4月23日

不知不觉,魔兽世界的第七个资料片也快来了

所以,又到了写副本杂谈的时候了么……