文章平均质量分 87
StevenIsSnail
辛苦理所当然。年轻就拼搏。挑战不确定。
展开
-
【gcj】2014 Round 3
解答Problem B. Last Hit这个题目DP, num[i] 为dianna杀死第i个monster时,能够得到的最大总得分。num[i] = max ( num[i-2]+m[i], num[i-3]+m[i] ) 原因是最优方案中,tower不可能连杀三个monster(最多连杀1或2个)。原因如下:Diana为了获取杀死某些monster的机会,会放弃某次原创 2014-11-09 02:26:15 · 530 阅读 · 0 评论 -
【google apec 2014 1a】 瞎子走maze,太空找最短路
problem C. cross maze http://code.google.com/codejam/contest/2924486/dashboard#s=p3迭代 10000 - 次其中: visit[x][y][direction]保存是否以direction方向来过,如果来过,说明有环,则走不出去了。 direction以顺时针从当前方向开始原创 2015-01-12 04:49:37 · 842 阅读 · 0 评论 -
【google apec 20151a, 1b, 1c】 七段码,找奇路径或环,切割矩形; n数填m空组合数,倒酒杯,三连扑克消除,第k括号序列;挖矿、+*计算器、俄罗斯方块
ROUND 1AA原创 2014-11-01 23:47:10 · 13225 阅读 · 2 评论 -
【gcj 2008 1b】numbers: 复数的次方取整+矩阵加速
a=3 + √5, aAnalysisSolving the large tests was a very different problem. The difficulty comes from the fact that √5 is irrational and for n close to 2000000000 you would need a lot of precis原创 2014-10-12 14:34:28 · 1582 阅读 · 0 评论 -
【google apec 2015 1b】 problem c: Card Game 三连扑克消除 DP
第三题 C #include #include using namespace std;inline bool isValid(int a,int b,int c,int k){ return b-a==k&&c-b==k;}//[ x y .....],kint dp(int a[],int n,int c){ if(n==0) return 0;原创 2014-09-15 17:39:30 · 678 阅读 · 0 评论 -
【google apec 2015 1b】 problem a: 密码攻击数 排列组合/动态规划
Problem A. Password AttackerThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start原创 2014-09-20 19:29:34 · 1348 阅读 · 0 评论 -
【google apec 2015 1b】problem d: 取第k个括号序列 卡特兰数/动态规划
卡特兰数: 一个2*n的序列,其中每一个元素为+1或-1,任意一点左边元素leijiahe原创 2014-09-20 22:27:00 · 960 阅读 · 0 评论 -
google+前端开发经验Idea
大家好,我是Google+基础架构团队的工程师。早在7月份,当Joseph Smarr开发出了Ask Me Anything栏目后,很多人都想知道一些关于Google+技术架构方面的信息。我们几个工程师觉得应该写一些关于这个题目的文章,给大家分享。对于Google+团队,我们头一个要认真处理的问题就是:页面生成速度。在谷歌,我们十分在意速度,下面就是我们用来提升速度的5项技术。转载 2015-01-13 03:06:21 · 1058 阅读 · 0 评论 -
【gcj 2014 r2】河流、trie sharding 题目
Problem C. Don't Break The NileThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-St转载 2014-11-05 03:12:35 · 806 阅读 · 0 评论 -
【gcj 2008 1a、b】素数集合记数,扑克环、奶茶、共轭数次方和取整
1BProblem A. Crop Triangleshttp://code.google.com/codejam/contest/32017/dashboard#s=p0组合计数问题,每个tree看成class[i = x%3][j = y%3]中的一个,枚举 E(i1+i2+i3=0MOD3, j1+j2+j3=0MOD3), 累加每种情况的组合数. 此外,三个相同点也视作。原创 2015-01-12 03:17:20 · 820 阅读 · 2 评论 -
【gcj】2012 round 2 待填坑
解答=====代码 ===原创 2014-11-09 04:28:08 · 579 阅读 · 0 评论 -
【gcj】2012 round 3 待填坑
题目==========================代码==========================题目==========================原创 2014-11-09 04:25:03 · 500 阅读 · 0 评论 -
【gcj】2013 round 2
解答====================================题目====================================Problem C. Erdős–SzekeresGiven a list X, consisting of the numbers (1, 2, ..., N), an increasing原创 2014-11-09 03:00:18 · 476 阅读 · 0 评论 -
Interview Guide From G-Company
IV. How to succeed the interview如何成功的面试Speak out and communicate大胆说出你的想法和主动交流Most of the time, you'll need more information from the interviewer to analyze & answer thequestion to its full e原创 2014-11-30 16:49:20 · 872 阅读 · 0 评论 -
面试贴
http://www.ninechapter.com/interview/10/背景:国内小城市本科,加拿大小学校master,即将毕业,无北美实习经验,无开源项目经验,GPA不高,没搞过acm,不喜欢写代码,喜欢瞎琢磨,喜欢扯淡,喜欢吃喝玩乐,喜欢滑雪爬山(蛮厉害的那种),喜欢各处玩(这个也蛮厉害的啊,自恋ing),不准备长期做码农。目标:FAG中的一个。因为喜欢转载 2015-01-09 05:06:49 · 690 阅读 · 0 评论 -
FLAG面试贴收集
无实习开源经验GPA不高的小硕的FLAGBR Offer经http://www.ninechapter.com/interview/10/电面:remove duplicate lines of a file(what if the file is very large which could not be held in the main memory)开关灯问题Trap转载 2015-01-09 05:17:26 · 1145 阅读 · 0 评论 -
【gcj 2008 1c】长数字串运算计数,递增子序列计数
第二题 长数字串运算计数长度为D的数字串(D两次DP 第一次用于区间[l, r] 对应的大整数对小整数 求余(见数字分类下的某篇文章)。 第二次是区间分解dp。算法code: https://github.com/stevenberge/acm/blob/master/gcj/20081c2.cc第三题 递增子序列计数 给定一个数列,求严格的单增子序原创 2014-12-14 18:58:12 · 595 阅读 · 0 评论 -
【面试】google电面等
google 电面 9.1问项目+两道算法题1、给定一个字符串s,找到s的最大字串并且字串内不同字符的数量不超过22、简单的DFS,给一个二维矩阵,每个位置代表海拔,问从哪些点能够走出矩阵(即到达边界)中间又两个下标写错了。。。希望影响不大原创 2014-09-15 10:56:21 · 2735 阅读 · 4 评论