![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
刷题
文章平均质量分 91
是某ICPC蒟蒻了
只会加罚时
展开
-
Stone Games
题目链接Stone Games 题意:给定n个正整数s1,s2,...,sns_{1},s_{2},...,s_{n}s1,s2,...,sn,有q次询问,每次询问输入li′,ri′l'_{i},r'_{i}li′,ri′,设第i次询问得到的答案是ansi−1ans_{i-1}ansi−1(特殊地,ans0=0ans_{0}=0ans0=0),令li=min{(li′+ansi−1)%n+1,(ri′+ansi−1)%n+1},ri=max{(li′+ansi−1)%n+1,(ri′+an原创 2021-04-05 20:13:57 · 160 阅读 · 0 评论 -
Can you answer these queries I
You are given a sequence A[1], A[2], …, A[N] . ( |A[i]| ≤ 15007 , 1 ≤ N ≤ 50000 ). A query is defined as follows: Query(x,y) = Max { a[i]+a[i+1]+…+a[j] ; x ≤ i ≤ j ≤ y }. Given M queries, your program must output the results of these queries. Input The fir原创 2020-12-06 13:35:22 · 82 阅读 · 0 评论 -
Steady Cow Assignment
题意:n个牛找B个槽子,对于每个槽子有不同的满意度,槽子有容量限制,让所有牛找到自己的槽子,满意差距尽可能少 思路:二分答案+二分图匹配 注意:二分答案要注意上界下界,本题我的做法下界应该取0,取1会WA #include<iostream> #include<cstring> using namespace std; typedef long long ll; typedef double db; #define rep(i,s,t) for(int i=s;i<=t;i++原创 2020-12-01 21:33:03 · 108 阅读 · 0 评论 -
Spreadsheets
In the popular spreadsheets systems (for example, in Excel) the following numeration of columns is used. The first column has number A, the second — number B, etc. till column 26 that is marked by Z. Then there are two-letter numbers: column 27 has number原创 2020-10-27 17:31:45 · 170 阅读 · 0 评论 -
k-Tree
Quite recently a creative student Lesha had a lecture on trees. After the lecture Lesha was inspired and came up with the tree of his own which he called ak-tree. Ak-tree is an infinite rooted tree where: each vertex has exactlykchildren; each edge ...原创 2020-10-24 20:12:06 · 262 阅读 · 0 评论