随笔分类 -  数据结构-树状数组

摘要:Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledge a[i]a[i]. Unfortunately, 阅读全文
posted @ 2018-09-12 23:24 Acerkoo 阅读(233) 评论(0) 推荐(0)
摘要:Split The Tree 题目描述 You are given a tree with n vertices, numbered from 1 to n. ith vertex has a value wiWe define the weight of a tree as the number 阅读全文
posted @ 2018-09-05 19:04 Acerkoo 阅读(718) 评论(1) 推荐(1)
摘要:树状数组的基本概念不说了,网上大佬们的讲解博客很多。 先上一段我的模板inline int lowbit(int x) {return x&-x;}inline void update(int x,int val){ for (int i=x; i<maxn; ... 阅读全文
posted @ 2018-07-20 00:03 Acerkoo 阅读(159) 评论(0) 推荐(0)
摘要:问题 N: 奇数码问题时间限制: 1 Sec 内存限制: 128 MB提交: 64 解决: 22[提交] [状态] [讨论版] [命题人:admin]题目描述你一定玩过八数码游戏,它实际上是在一个3*3的网格中进行的,1个空格和1~8这8个数字恰好不重不漏地分布在... 阅读全文
posted @ 2018-07-19 23:59 Acerkoo 阅读(215) 评论(0) 推荐(0)
摘要:链接:https://www.nowcoder.com/acm/contest/139/J 来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描述 Given a sequence 阅读全文
posted @ 2018-07-19 23:44 Acerkoo 阅读(164) 评论(0) 推荐(1)