2014年9月24日

Hdu 2874(LCA)

摘要: 题目链接Connections between citiesTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5037Accepted Submis... 阅读全文

posted @ 2014-09-24 21:58 Stomach_ache 阅读(176) 评论(0) 推荐(0) 编辑

Lowest Common Ancestor (LCA)

摘要: 题目链接In a rooted tree, thelowest common ancestor(or LCA for short) of two verticesuandvis defined as the lowest vertex that is ancestor of both that tw... 阅读全文

posted @ 2014-09-24 19:59 Stomach_ache 阅读(523) 评论(0) 推荐(0) 编辑

COOK50小结

摘要: 题目链接很遗憾。看到第五题的通过人数就不敢做了。待日后补上。A题求最长的连续子序列,使得他们满足gcd为1。如果有相邻的两个数的gcd为1,那么整个序列的gcd值也就是1,否则就是该序列不存在。 1 /*************************************************... 阅读全文

posted @ 2014-09-24 14:19 Stomach_ache 阅读(180) 评论(0) 推荐(0) 编辑

导航