
补题日记
文章平均质量分 64
蛀牙牙乐
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2022杭电多校第一场(K/L/B/C)
待补原创 2022-08-01 22:22:10 · 271 阅读 · 0 评论 -
The 19th Zhejiang Provincial Collegiate Programming Contest 2022浙江省赛 (A/B/C/G/L/I)
待补原创 2022-05-18 13:48:08 · 1589 阅读 · 0 评论 -
Codeforces Round #629 (Div. 3) (A/B/C/D)
待补原创 2022-05-16 12:59:23 · 136 阅读 · 0 评论 -
训练赛补题
A Count Task 队友过的 血泪教训: 子串 substrings:在严格的一段区间里连续 子序列Subsequence:从区间里挑出来的部分 会有爆掉的风险,所以决定以后在乘法、除法前都乘个ll int num[maxn]; int main() { IOS; int t; cin >> t; while(t--){ re(num); string s; cin >> s; ll len = s.size(); ll cnt = 0, re原创 2022-05-15 15:52:41 · 191 阅读 · 2 评论 -
选拔赛补题
全是cf上的题,可重做:最短路、计算几何原创 2022-05-09 22:40:44 · 265 阅读 · 3 评论 -
第 46 届 ICPC 国际大学生程序设计竞赛亚洲区域赛(上海)(热身赛(A/B) + 正式赛(D/E))
待补原创 2022-05-06 18:21:54 · 612 阅读 · 0 评论 -
Codeforces Round #786 (Div. 3) Editorial(A/B/C/D)待补
A. int main() { IOS; // freopen("P1908_6.in","r",stdin);//读入数据 // freopen("P1908.out","w",stdout); //输出数据 int t; cin >> t; while(t--){ ll x, y; cin >> x >> y; if(y < x || y % x) cout << "0 0" << endl; else原创 2022-05-04 17:36:46 · 146 阅读 · 0 评论 -
2021 年第十三届四川省 ACM-ICPC 大学生程序设计竞赛(A/B/D/H/E/K/M/L)
https://codeforces.com/gym/103117 A. 水题 int main() { IOS; int t; cin >> t; while(t--){ int k; cin >> k; if(k > 12) cout << 0 << endl; else { int ans = 0;原创 2022-05-03 20:39:03 · 1959 阅读 · 0 评论 -
第46届ICPC 澳门 热身赛 + 正式赛(F/K/A)
难,待补原创 2022-05-02 13:46:11 · 1195 阅读 · 0 评论 -
L1-088 静静的推荐
链接 谁懂,居然这么简单我写得好复杂。真的太难受了,但是考试途中还是骗了14分,下次一定把代码留下。 现在重写只有四分,真的这题很简单,是题没读懂 我的想法:满足的放vector里面排个序,再标记,循环k次去选 实际:先筛同时满足的,再筛k次的。 主要是读题 ...原创 2022-04-28 13:03:12 · 510 阅读 · 3 评论 -
天梯赛 L2-4 大众情人(floyd)
因为数据量很小,所以可以直接f 注意是单向边,就是说 g[i][j] 和 g[j][i] 是不一样的 需要注意的地方在注释中已给出 到时候再补dij #include <iostream> #include <algorithm> #include <cstdio> #include <cstring> #include <set> #include <map> #include <vector> #include<c原创 2022-04-27 13:53:12 · 465 阅读 · 0 评论 -
第46届ICPC昆明 补题(热身赛 + 正式赛)(K/D/F/G)
热身赛 A.水题 int t, f, s, p, c; for (int i = 0; i < 2; ++i){ cin >> t >> f >> s >> p >> c; cout << (t * 6 + f * 3 + s * 2 + p * 1 + c * 2) << " "; } B. 第一次还分类讨论了,以后带有固定数的不用分类讨论。 wa后生怕是爆long long…如果思路没原创 2022-04-27 13:09:06 · 429 阅读 · 0 评论 -
4.15 最短路 题
青蛙 思路:单源最短路,两两之间取max floyd //5552ms pair<int, int> p[210]; double dist[210][210]; int t; int pre[210]; int main() { IOS; int cnt = 1; while (cin >> t && t) { re(p); re(dist); re(pre); for (int i = 1; i <= t; ++i) cin原创 2022-04-15 21:12:39 · 87 阅读 · 0 评论 -
4.11刷题日记 / 区间求交
围栏刷漆 不会区间相交… int a, b, c, d; cin >> a >> b >> c >> d; int len = max(min(d, b) - max(a, c), 0); cout << b - a + d - c - len; 告诉了我们如果这里讨论不通,就换一个讨论方式。 区间问题有时候 全集 - 交集 更能得出结果 还有其它方式,其实这题暴力也可以过,不用拘泥于一个形式 类似题: 阻挡广告牌麻了,也是写过的原创 2022-04-11 22:13:25 · 261 阅读 · 0 评论 -
4.7日刷题记录
小朋友排队 注意0的情况, lowbit(0) = 0; 类似于冒泡排序,k个逆序对,交换k次,每次交换只会使逆序对减一 因为考虑了区间,所以用了树状数组 树状数组里存的是这个数字的个数 k个逆序对:比它大的 + 比它小的 每个数都会被这样操作一次,所以需要除二,每个数必定被操作一次(虽然但是,还是不能明白(n * (n + 1) / 2) int a[maxn]; int sum1[maxn], sum2[maxn]; int n; inline int lowbit(int x){ return原创 2022-04-07 21:32:18 · 99 阅读 · 0 评论 -
4.6日刷题记录
交换瓶子 int a[maxn]; int mp[maxn]; int main() { IOS; // freopen("P1908_6.in","r",stdin);//读入数据 // freopen("P1908.out","w",stdout); //输出数据 int n; cin >> n; for (int i = 1; i <= n; ++i){ cin >> a[i]; mp[...原创 2022-04-06 21:38:38 · 406 阅读 · 0 评论 -
4.5刷题日记
C循环 还是和昨天一样的题型,背就完事了 ll a[maxn]; ll exgcd(ll a, ll b, ll &x, ll &y){ if(!b){ x = 1, y = 0; return a; } int d = exgcd(b, a % b, y, x); y -= a / b * x; return d; } int main() { IOS; // freopen("P1908_6.in","r",stdin);//读入数据 // freopen("原创 2022-04-05 22:49:23 · 74 阅读 · 0 评论 -
4.4日刷题记录
斐波那契前 n 项和 构造: f[1] * A^(n - 1) = f[n] ,它们都是矩阵 int n, m; void mul(int a[], int b[], int c[][3]){ int temp[3] = {0}; for(int i = 0; i < 3; ++i){ for (int j = 0; j < 3; ++j){ temp[i] = (temp[i] + (ll)b[j] * c[j][i]) % m;原创 2022-04-04 21:29:32 · 264 阅读 · 0 评论 -
4.2刷题记录
乘积最大 分类讨论错了,而且想的很麻烦,下次就是题目要求什么分析哪个变量 wa点: 1、因为temp1、temp2最大是10的10次方,不先处理(mod)的话会爆 2、比大小是不能去取模,9 % 8 == 1 ,7 % 8 == 7 ll a[maxn]; int main() { IOS; // freopen("P1908_6.in","r",stdin);//读入数据 // freopen("P1908.out","w",stdout); //输出数据 int n, k;原创 2022-04-02 21:18:59 · 103 阅读 · 0 评论 -
4.1刷题记录
波动数列 int dp[1005][1005]; int mood(int n, int m){ return (n % m + m) % m;//求正余数 } int main() { IOS; // freopen("P1908_6.in","r",stdin);//读入数据 // freopen("P1908.out","w",stdout); //输出数据 int n, s, a, b; cin >> n >> s >> a &原创 2022-04-01 21:40:30 · 375 阅读 · 0 评论 -
3.31刷题日记
买不到的数目 结论: 如果 a,b 均是正整数且互质,那么由 ax + by, x ≥ 0, y ≥ 0 不能凑出的最大数是 ab − a − b 我用队列果然超时了,以后这种题如果这样都超时了,基本可以考虑找规律了 找规律的方法:例 3 1 -> ? 3 2 -> ? 3 3 -> ? 3 4 -> ? 带证明的相似题 ...原创 2022-03-31 22:10:50 · 76 阅读 · 0 评论 -
3.30刷题日记
水桶传递队列 很简单,一眼bfs,觉得这题似曾相识,考虑用2进制的01来做,但下手前犹豫了一下看了眼标签,哦分类讨论。 但是分类讨论我讨论了一直错,太难受了 int main() { IOS; // freopen("P1908_6.in","r",stdin);//读入数据 // freopen("P1908.out","w",stdout); //输出数据 char c; int x1, y1, x2, y2, x3, y3; for (int i = 1; i <=原创 2022-03-30 22:39:48 · 241 阅读 · 0 评论 -
3.29刷题记录
数的划分 根据昨天的整数划分规律,再推一下 怎么说呢,还是不咋会,到时候再重新跟着y总推一下吧,那视频翻来覆去看,昨天懂了一点点,今天全忘了orz int main() { IOS; // freopen("P1908_6.in","r",stdin);//读入数据 // freopen("P1908.out","w",stdout); //输出数据 int n, m; cin >> n >> m; re(f); for (int i = 1; i &原创 2022-03-29 21:45:55 · 83 阅读 · 0 评论 -
3.28补题记录
文章目录前言一、[我在哪?](https://www.acwing.com/problem/content/description/1462/)二、[股票买卖](https://www.acwing.com/problem/content/description/1057/)三、[序列处理](https://www.acwing.com/problem/content/description/4309/)四、[鸣人的影分身](https://www.acwing.com/problem/content/10原创 2022-03-28 22:00:21 · 569 阅读 · 1 评论