摘要:
Problem Description A bracket sequence is a string, containing only characters "(", ")", "[" and "]". A correct bracket sequen... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(31)
评论(0)
推荐(0)
摘要:
Problem Description Harry Potter has a difficult homework. Given a rectangular table, consisting of n × m cells. Each cell of t... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(66)
评论(0)
推荐(0)
摘要:
Problem Description An expedition group flew from planet ACM-1 to Earth in order to study the bipedal species (its representati... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(15)
评论(0)
推荐(0)
摘要:
Problem Description You've got an array a, consisting of n integers. The array elements are indexed from 1 to n. Let's determin... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(18)
评论(0)
推荐(0)
摘要:
昨晚 CF 成功上分,终于到了蓝绿名。。。 白天补了一天题,筋疲力尽。。。 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(12)
评论(0)
推荐(0)
摘要:
Problem Description You are given a connected undirected weighted graph consisting of nn vertices and mm edges. You need to pr... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(25)
评论(0)
推荐(0)
摘要:
题目 小b有一个01序列,她想找到一个最长的区间使得这个区间的01能两两配对,即0的个数和1的个数相等。求最长区间的长度。 输入 第一行一个正整数n,表示数组长度,其中0<n≤50000; 第二行n个0或1,以空格隔开。 输出 输出一个数,表示最... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(20)
评论(0)
推荐(0)
摘要:
题目 小b有一个01序列A,她想知道A有多少个非空连续子序列和为S。 你能帮帮她吗? 输入 第一行输入一个数n,表示A的长度; 第二行输入n个数‘0’或‘1’,表示A中的元素,以空格隔开; 第三行输入一个非负整数S; 其中0≤S≤n≤30000。 ... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(24)
评论(0)
推荐(0)
摘要:
【差分数组】 差分数组不仅仅是一个优秀的线性结构,还是一种很好的思想,其主要用于修改区间、查询单点,其中,修改区间的时间复杂度均为 O(1),查询单点的时间复杂度为 O(n) 对于已知有 n 个元素的离线数列 a,可以建立一个记录它每项与前一项差值的差分数组 ... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(51)
评论(0)
推荐(0)
摘要:
Problem Description N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a #include#include#include#include#include#include#include#include... 阅读全文
posted @ 2022-09-20 22:53
老程序员111
阅读(24)
评论(0)
推荐(0)

浙公网安备 33010602011771号