06 2022 档案

E. Price Maximization(贪心)
摘要:题面 思路:(a+b)/k=a/k+b/k,所以总和可以先用对每一个数字除k加起来 部分数字不是k的倍数,但两两配合后是k倍数,这样相当于我们损失了一个cnt,所以最后我们要找出有多少个这样的配对,最后答案加上配置数量即可 阅读全文

posted @ 2022-06-11 10:04 zesure 阅读(52) 评论(0) 推荐(0) 编辑

C - Table Decorations
摘要:思路:一眼贪.jpg 不过讨论贪心的情况太多了就得考虑自己的思路是否错了,一些trick自己想不到还是得自己多做题积累 对于能够组成桌子的情况,分为abc和abb两种,桌子分得最多就代表着剩余的差值最少(对于大部分贪心问题而言,题目给出的条件到最后一般都为另一种条件的体现,如何正确地理解问题本质是解 阅读全文

posted @ 2022-06-10 20:56 zesure 阅读(30) 评论(0) 推荐(1) 编辑

机组期末笔记
摘要:可执行文件存储映像 2,.o是可重定位文件 3,未初始化信息在bss节,否则送到data节 4,rodata是只读数据(const) 5, 6, 7, 阅读全文

posted @ 2022-06-09 14:04 zesure 阅读(34) 评论(0) 推荐(0) 编辑

python笔记
摘要:1,#单行注释,''' '''多行注释 2,input输入值为str 3,避免小数位数过多 from decimal import Decimal print(Decimal('1.1')+Decimal('2.2')) 4,一次性读入多个数据 a, b, c = input('输入a,b空格隔开: 阅读全文

posted @ 2022-06-05 19:14 zesure 阅读(24) 评论(0) 推荐(0) 编辑

线段树板子题自用
摘要:思路:单点修改,区间查询 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int INF=0xffffff0; const int maxn=10 阅读全文

posted @ 2022-06-05 15:46 zesure 阅读(26) 评论(0) 推荐(0) 编辑

AtCoder Beginner Contest 128 D - equeue
摘要:#include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> #include<iostream> #include<algorithm> #include<vector> #include<queue> typede 阅读全文

posted @ 2022-06-02 13:04 zesure 阅读(30) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示