上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 38 下一页
摘要: https://codeforces.com/problemset/problem/1000/C 题意: 有n个线段,覆盖[li,ri],最后依次输出覆盖层数为1~n的点的个数。 思路: 区间线段覆盖问题,第一反应树状数组、线段树,看了看数据规模,开不了这么大的空间。 只能用差分了 代码如下: 1 阅读全文
posted @ 2019-10-03 03:58 jiamian22 阅读(397) 评论(0) 推荐(0)
摘要: 先粘上我入门时看的博客: https://www.cnblogs.com/jinkun113/p/4743694.html https://www.cnblogs.com/victorique/p/8480093.html https://www.cnblogs.com/jinkun113/p/47 阅读全文
posted @ 2019-09-16 20:01 jiamian22 阅读(279) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6514 Problem Description Xiaoteng has a large area of land for growing crops, and the land can be seen as a 阅读全文
posted @ 2019-09-16 01:24 jiamian22 阅读(575) 评论(0) 推荐(0)
摘要: 先粘上我入门时看的博客:https://blog.csdn.net/qq_41117236/article/details/89438153 声明:以下部分内容摘自该博客,仅供个人复习时用 【引入】 首先给出一个问题:给定n个数,再给出m个询问,每个询问给出区间Li,Ri和x,要求你在Li到Ri上每 阅读全文
posted @ 2019-09-16 00:34 jiamian22 阅读(1270) 评论(0) 推荐(0)
摘要: https://nanti.jisuanke.com/t/41399 题目大意: 有n个灯,m次操作,每次修改[l,r]内的灯,(off - on ,on - off),问最后有几盏灯亮着. 换种说法:n个点m个区间,每次区间内的数+1,最后n个点中计数为奇数的点的个数就是答案。 刚开始没注意,直接 阅读全文
posted @ 2019-09-16 00:16 jiamian22 阅读(335) 评论(0) 推荐(0)
摘要: 先粘上我入门时看的博客(下面部分摘自该博客): https://www.cnblogs.com/xenny/p/9739600.html 下面是我粘上以供自己复习的点: 树状数组的优点和缺点 修改和查询的复杂度都是O(logN),而且相比线段树系数要少很多,比传统数组要快,而且容易写。 缺点是遇到复 阅读全文
posted @ 2019-09-16 00:02 jiamian22 阅读(299) 评论(0) 推荐(0)
摘要: https://nanti.jisuanke.com/t/41422 题目大意: 给出n和b,求1到n,各数在b进制下各位数之和的总和。 直接暴力模拟,TLE。。 没想到是要打表。。。还是太菜了。 阅读全文
posted @ 2019-09-15 23:48 jiamian22 阅读(339) 评论(0) 推荐(0)
摘要: [USACO09MAR]向右看齐Look Up(单调栈、在线处理) https://www.luogu.org/problem/P2947 题目描述 Farmer John's N (1 <= N <= 100,000) cows, conveniently numbered 1..N, are o 阅读全文
posted @ 2019-09-09 23:52 jiamian22 阅读(283) 评论(0) 推荐(0)
摘要: 链接:https://ac.nowcoder.com/acm/contest/1086/C 题目描述 "Never a borrower nor a lender be." O how Bessie wishes she had taken that advice! She has borrowed 阅读全文
posted @ 2019-09-09 23:22 jiamian22 阅读(327) 评论(0) 推荐(0)
摘要: 链接:https://ac.nowcoder.com/acm/contest/1086/F来源:牛客网 题目描述 A full moon casts some sort of spell on the cows and, like their cousins the wolves and coyot 阅读全文
posted @ 2019-09-09 23:00 jiamian22 阅读(279) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 38 下一页