数据结构-线段树
brav0
练习算法两年半的ACM选手
展开
-
“卓见杯”2020年河南省第二届CCPC大学生程序设计竞赛 J.二进制与、平方和
2699: 二进制与、平方和时间限制:3Sec内存限制:512 MB提交:58解决:10[状态] [讨论版] [提交] [命题人:admin]题目描述请你维护一个长度为n的非负整数序列a1,a2,…,an,支持以下两种操作:第一种操作会将序列al,al+1,…,ar中的每个元素,修改为各自和x的"二进制与"(Bitwise binary AND)的值,其中l,r,x在每次操作时会给定; 第二种操作会询问序列al,al+1,…,ar中所有元素的平方...原创 2020-11-25 22:31:18 · 763 阅读 · 0 评论 -
2019-2020 ICPC, Asia Jakarta Regional Contest G. Performance Review(线段树)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRandall is a software engineer at a company withNNemployees. Every year, the com...原创 2019-10-28 21:47:44 · 427 阅读 · 1 评论 -
2019-2020 ICPC, Asia Jakarta Regional Contest K. Addition Robot(线段树 + 矩阵乘法)
time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAdding two numbers several times is a time-consuming task, so you want to build a ...原创 2019-10-27 21:49:02 · 4144 阅读 · 0 评论 -
Codeforces E. New Year and Old Subsequence (线段树 + dp + 矩阵)
time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA stringtis calledniceif a string "2017" occurs intas asubsequencebut a st...原创 2019-09-11 00:54:56 · 271 阅读 · 0 评论 -
The 2019 Asia Nanchang First Round Online Programming Contest C. Hello 2019 (线段树 + dp + 矩阵)
A digital string is "good": when it contains a subsequence91029102and does not contain a subsequence81028102.The bad value of a string is defined as how many characters are to remove at least, so...原创 2019-09-11 01:07:39 · 202 阅读 · 0 评论