摘要: 切蛋糕 题目描述 黄学长昨晚CF强势AK,怒踩Tourist,这势必要进行庆祝,于是庆祝专用蛋糕就这样诞生了,这是一块矩形蛋糕,它由N×M个小蛋糕组成,每个蛋糕的美味指数为Tij。为了把蛋糕分给众人,黄学长决定横着切A−1刀,再把得到的A块各竖着切B−1刀,分成B块,这样一共有A×B块。为了使大家都 阅读全文
posted @ 2019-10-14 15:40 Suiyue_Li 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 小A盗墓 时间限制: 5 Sec 内存限制: 128 MB 题目描述 小A终于通过了保安的考验,来到了古墓门前,古墓门前有n根柱子,第i根柱子的高度是整数。古墓的门上会弹出一些暗号,机智小A猜到这个暗号表示询问第l到第r根柱子的高度在升序排序后是否构成一段连续且上升的序列。并且这些柱子的高度还可能在 阅读全文
posted @ 2019-09-25 18:53 Suiyue_Li 阅读(178) 评论(0) 推荐(0) 编辑
摘要: //#pragma GCC optimize(4) #include <bits/stdc++.h> typedef long long ll; using namespace std; const int N=100000+5; #define ls (p<<1) #define rs (p<<1 阅读全文
posted @ 2019-09-02 16:55 Suiyue_Li 阅读(135) 评论(0) 推荐(0) 编辑
摘要: icpc的老题了,最近学校oj调出来拿来在训练赛做了,比赛的时候跟队友讨论了两种做法,一种是for循环加树状数组(分析了分析时间复杂度感觉虽然会t,但是应该不存在那种故意卡的数据,就直接交了,没想到一下就过了,于是第二种做法就没有实践),然而没想到比赛刚一结束学长反手就交了这样的一组hack数据卡掉 阅读全文
posted @ 2019-08-26 21:38 Suiyue_Li 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 问题 D: Tally Counters 题目描述 A number of tally counters are placed in a row. Pushing the button on a counter will increment the displayed value by one, o 阅读全文
posted @ 2019-08-23 10:19 Suiyue_Li 阅读(380) 评论(0) 推荐(0) 编辑
摘要: Welcome Party 题目描述 The annual welcome party of the Department of Computer Science and Technology is coming soon! Many students have been applying to s 阅读全文
posted @ 2019-08-22 19:50 Suiyue_Li 阅读(376) 评论(0) 推荐(0) 编辑
摘要: Valentine's Day 题目描述 Oipotato loves his girlfriend very much. Since Valentine's Day is coming, he decides to buy some presents for her.There are n pre 阅读全文
posted @ 2019-08-22 19:42 Suiyue_Li 阅读(302) 评论(0) 推荐(0) 编辑
摘要: #define ls p<<1 #define rs p<<1|1 struct Seg { int p,l,r; ll sum,tag,mx; #define l(i) t[i].l #define r(i) t[i].r #define mx(i) t[i].mx #define tag(i) 阅读全文
posted @ 2019-08-19 21:13 Suiyue_Li 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 最近心血来潮安装了linux系统后,本来打算使用Codeblocks (平时打ACM用的比较多),但是编译的时候一直报 ”It seems that this project has not been built yet.Do you want to build it now?"就很难受,百度找了很 阅读全文
posted @ 2019-08-18 23:57 Suiyue_Li 阅读(6814) 评论(0) 推荐(0) 编辑
摘要: Governing sand 传送门:https://ac.nowcoder.com/acm/contest/887/C来源:牛客网 题意:给了n种树,每种树的个数是p[i],高度是h[i],砍掉每个树花费是c[i]。要求最高的树要严格比总数目的一半多,问砍掉一些树使得条件满足的最小代价。 思路:这 阅读全文
posted @ 2019-08-08 20:16 Suiyue_Li 阅读(164) 评论(0) 推荐(0) 编辑